Wine-Devel
By thread
wine-devel@list.winehq.org
By month
Messages by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
April 2020
- 87 participants
- 2158 messages
[PATCH 1/4] quartz/vmr9: Remove some dead code.
by Zebediah Figura
We already check filter->num_surfaces above.
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/quartz/vmr9.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c
index 771e90050da..652705e8430 100644
--- a/dlls/quartz/vmr9.c
+++ b/dlls/quartz/vmr9.c
@@ -434,11 +434,6 @@ static HRESULT VMR9_maybe_init(struct quartz_vmr *filter, BOOL force, const AM_M
info.szNativeSize.cy = filter->bmiheader.biHeight;
filter->cur_surface = 0;
- if (filter->num_surfaces)
- {
- ERR("num_surfaces or d3d9_surfaces not 0\n");
- return E_FAIL;
- }
if (!is_vmr9(filter))
{
--
2.26.2
April 30, 2020
[PATCH v2] include: Add dvdif.idl.
by Zebediah Figura
From: Vijay Kiran Kamuju <infyquest(a)gmail.com>
Signed-off-by: Vijay Kiran Kamuju <infyquest(a)gmail.com>
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
include/Makefile.in | 1 +
include/dvdif.idl | 742 ++++++++++++++++++++++++++++++++++++++++++++
include/strmif.idl | 6 +-
3 files changed, 744 insertions(+), 5 deletions(-)
create mode 100644 include/dvdif.idl
diff --git a/include/Makefile.in b/include/Makefile.in
index 543d41811c..74db5ee151 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -238,6 +238,7 @@ SOURCES = \
dshow.h \
dsound.h \
dsrole.h \
+ dvdif.idl \
dvdmedia.h \
dvoice.h \
dwmapi.h \
diff --git a/include/dvdif.idl b/include/dvdif.idl
new file mode 100644
index 0000000000..3640a56a55
--- /dev/null
+++ b/include/dvdif.idl
@@ -0,0 +1,742 @@
+/*
+ * Copyright (C) 2020 Vijay Kiran Kamuju
+ *
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#if 0
+pragma makedep install
+#endif
+
+import "unknwn.idl";
+import "objidl.idl";
+
+cpp_quote("#include <ddraw.h>")
+
+cpp_quote("#if 0")
+interface IGraphBuilder;
+cpp_quote("#endif")
+
+typedef enum tagDVD_DOMAIN
+{
+ DVD_DOMAIN_FirstPlay = 1,
+ DVD_DOMAIN_VideoManagerMenu,
+ DVD_DOMAIN_VideoTitleSetMenu,
+ DVD_DOMAIN_Title,
+ DVD_DOMAIN_Stop
+} DVD_DOMAIN;
+
+typedef enum tagDVD_MENU_ID
+{
+ DVD_MENU_Title = 2,
+ DVD_MENU_Root = 3,
+ DVD_MENU_Subpicture = 4,
+ DVD_MENU_Audio = 5,
+ DVD_MENU_Angle = 6,
+ DVD_MENU_Chapter = 7
+} DVD_MENU_ID;
+
+typedef enum tagDVD_DISC_SIDE
+{
+ DVD_SIDE_A = 1,
+ DVD_SIDE_B = 2
+} DVD_DISC_SIDE;
+
+typedef enum tagDVD_PREFERRED_DISPLAY_MODE
+{
+ DISPLAY_CONTENT_DEFAULT = 0,
+ DISPLAY_16x9 = 1,
+ DISPLAY_4x3_PANSCAN_PREFERRED = 2,
+ DISPLAY_4x3_LETTERBOX_PREFERRED = 3
+} DVD_PREFERRED_DISPLAY_MODE;
+
+typedef WORD DVD_REGISTER;
+typedef DVD_REGISTER GPRMARRAY[16];
+typedef DVD_REGISTER SPRMARRAY[24];
+
+typedef struct tagDVD_ATR
+{
+ ULONG ulCAT;
+ BYTE pbATRI[768];
+} DVD_ATR;
+
+typedef BYTE DVD_VideoATR[2];
+typedef BYTE DVD_AudioATR[8];
+typedef BYTE DVD_SubpictureATR[6];
+
+typedef enum tagDVD_FRAMERATE
+{
+ DVD_FPS_25 = 1,
+ DVD_FPS_30NonDrop = 3
+} DVD_FRAMERATE;
+
+cpp_quote("typedef struct tagDVD_TIMECODE")
+cpp_quote("{")
+cpp_quote(" ULONG Hours1 : 4;")
+cpp_quote(" ULONG Hours10 : 4;")
+cpp_quote(" ULONG Minutes1 : 4;")
+cpp_quote(" ULONG Minutes10 : 4;")
+cpp_quote(" ULONG Seconds1 : 4;")
+cpp_quote(" ULONG Seconds10 : 4;")
+cpp_quote(" ULONG Frames1 : 4;")
+cpp_quote(" ULONG Frames10 : 2;")
+cpp_quote(" ULONG FrameRateCode : 2;")
+cpp_quote("} DVD_TIMECODE;")
+
+typedef enum tagDVD_NavCmdType
+{
+ DVD_NavCmdType_Pre = 1,
+ DVD_NavCmdType_Post = 2,
+ DVD_NavCmdType_Cell = 3,
+ DVD_NavCmdType_Button = 4
+} DVD_NavCmdType;
+
+typedef enum tagDVD_TIMECODE_FLAGS
+{
+ DVD_TC_FLAG_25fps = 0x00000001,
+ DVD_TC_FLAG_30fps = 0x00000002,
+ DVD_TC_FLAG_DropFrame = 0x00000004,
+ DVD_TC_FLAG_Interpolated = 0x00000008
+} DVD_TIMECODE_FLAGS;
+
+typedef struct tagDVD_HMSF_TIMECODE
+{
+ BYTE bHours;
+ BYTE bMinutes;
+ BYTE bSeconds;
+ BYTE bFrames;
+} DVD_HMSF_TIMECODE;
+
+typedef struct tagDVD_PLAYBACK_LOCATION2
+{
+ ULONG TitleNum;
+ ULONG ChapterNum;
+ DVD_HMSF_TIMECODE TimeCode;
+ ULONG TimeCodeFlags;
+} DVD_PLAYBACK_LOCATION2;
+
+typedef struct tagDVD_PLAYBACK_LOCATION
+{
+ ULONG TitleNum;
+ ULONG ChapterNum;
+ ULONG TimeCode;
+} DVD_PLAYBACK_LOCATION;
+
+typedef DWORD VALID_UOP_SOMTHING_OR_OTHER;
+
+typedef enum
+{
+ UOP_FLAG_Play_Title_Or_AtTime = 0x00000001,
+ UOP_FLAG_Play_Chapter = 0x00000002,
+ UOP_FLAG_Play_Title = 0x00000004,
+ UOP_FLAG_Stop = 0x00000008,
+ UOP_FLAG_ReturnFromSubMenu = 0x00000010,
+ UOP_FLAG_Play_Chapter_Or_AtTime = 0x00000020,
+ UOP_FLAG_PlayPrev_Or_Replay_Chapter = 0x00000040,
+ UOP_FLAG_PlayNext_Chapter = 0x00000080,
+ UOP_FLAG_Play_Forwards = 0x00000100,
+ UOP_FLAG_Play_Backwards = 0x00000200,
+ UOP_FLAG_ShowMenu_Title = 0x00000400,
+ UOP_FLAG_ShowMenu_Root = 0x00000800,
+ UOP_FLAG_ShowMenu_SubPic = 0x00001000,
+ UOP_FLAG_ShowMenu_Audio = 0x00002000,
+ UOP_FLAG_ShowMenu_Angle = 0x00004000,
+ UOP_FLAG_ShowMenu_Chapter = 0x00008000,
+ UOP_FLAG_Resume = 0x00010000,
+ UOP_FLAG_Select_Or_Activate_Button = 0x00020000,
+ UOP_FLAG_Still_Off = 0x00040000,
+ UOP_FLAG_Pause_On = 0x00080000,
+ UOP_FLAG_Select_Audio_Stream = 0x00100000,
+ UOP_FLAG_Select_SubPic_Stream = 0x00200000,
+ UOP_FLAG_Select_Angle = 0x00400000,
+ UOP_FLAG_Select_Karaoke_Audio_Presentation_Mode = 0x00800000,
+ UOP_FLAG_Select_Video_Mode_Preference = 0x01000000
+} VALID_UOP_FLAG;
+
+typedef enum
+{
+ DVD_CMD_FLAG_None = 0x00000000,
+ DVD_CMD_FLAG_Flush = 0x00000001,
+ DVD_CMD_FLAG_SendEvents = 0x00000002,
+ DVD_CMD_FLAG_Block = 0x00000004,
+ DVD_CMD_FLAG_StartWhenRendered = 0x00000008,
+ DVD_CMD_FLAG_EndAfterRendered = 0x00000010
+} DVD_CMD_FLAGS;
+
+typedef enum
+{
+ DVD_ResetOnStop = 1,
+ DVD_NotifyParentalLevelChange = 2,
+ DVD_HMSF_TimeCodeEvents = 3,
+ DVD_AudioDuringFFwdRew = 4,
+ DVD_EnableNonblockingAPIs = 5,
+ DVD_CacheSizeInMB = 6,
+ DVD_EnablePortableBookmarks = 7,
+ DVD_EnableExtendedCopyProtectErrors = 8,
+ DVD_NotifyPositionChange = 9,
+ DVD_IncreaseOutputControl = 10,
+ DVD_EnableStreaming = 11,
+ DVD_EnableESOutput = 12,
+ DVD_EnableTitleLength = 13,
+ DVD_DisableStillThrottle = 14,
+ DVD_EnableLoggingEvents = 15,
+ DVD_MaxReadBurstInKB = 16,
+ DVD_ReadBurstPeriodInMS = 17,
+ DVD_RestartDisc = 18,
+ DVD_EnableCC = 19
+} DVD_OPTION_FLAG;
+
+typedef enum
+{
+ DVD_Relative_Upper = 1,
+ DVD_Relative_Lower = 2,
+ DVD_Relative_Left = 3,
+ DVD_Relative_Right = 4
+} DVD_RELATIVE_BUTTON;
+
+typedef enum tagDVD_PARENTAL_LEVEL
+{
+ DVD_PARENTAL_LEVEL_8 = 0x8000,
+ DVD_PARENTAL_LEVEL_7 = 0x4000,
+ DVD_PARENTAL_LEVEL_6 = 0x2000,
+ DVD_PARENTAL_LEVEL_5 = 0x1000,
+ DVD_PARENTAL_LEVEL_4 = 0x0800,
+ DVD_PARENTAL_LEVEL_3 = 0x0400,
+ DVD_PARENTAL_LEVEL_2 = 0x0200,
+ DVD_PARENTAL_LEVEL_1 = 0x0100
+} DVD_PARENTAL_LEVEL;
+
+typedef enum tagDVD_AUDIO_LANG_EXT
+{
+ DVD_AUD_EXT_NotSpecified = 0,
+ DVD_AUD_EXT_Captions = 1,
+ DVD_AUD_EXT_VisuallyImpaired = 2,
+ DVD_AUD_EXT_DirectorComments1 = 3,
+ DVD_AUD_EXT_DirectorComments2 = 4
+} DVD_AUDIO_LANG_EXT;
+
+typedef enum tagDVD_SUBPICTURE_LANG_EXT
+{
+ DVD_SP_EXT_NotSpecified = 0,
+ DVD_SP_EXT_Caption_Normal = 1,
+ DVD_SP_EXT_Caption_Big = 2,
+ DVD_SP_EXT_Caption_Children = 3,
+ DVD_SP_EXT_CC_Normal = 5,
+ DVD_SP_EXT_CC_Big = 6,
+ DVD_SP_EXT_CC_Children = 7,
+ DVD_SP_EXT_Forced = 9,
+ DVD_SP_EXT_DirectorComments_Normal = 13,
+ DVD_SP_EXT_DirectorComments_Big = 14,
+ DVD_SP_EXT_DirectorComments_Children = 15
+} DVD_SUBPICTURE_LANG_EXT;
+
+typedef enum tagDVD_AUDIO_APPMODE
+{
+ DVD_AudioMode_None = 0,
+ DVD_AudioMode_Karaoke = 1,
+ DVD_AudioMode_Surround = 2,
+ DVD_AudioMode_Other = 3
+} DVD_AUDIO_APPMODE;
+
+typedef enum tagDVD_AUDIO_FORMAT
+{
+ DVD_AudioFormat_AC3 = 0,
+ DVD_AudioFormat_MPEG1 = 1,
+ DVD_AudioFormat_MPEG1_DRC = 2,
+ DVD_AudioFormat_MPEG2 = 3,
+ DVD_AudioFormat_MPEG2_DRC = 4,
+ DVD_AudioFormat_LPCM = 5,
+ DVD_AudioFormat_DTS = 6,
+ DVD_AudioFormat_SDDS = 7,
+ DVD_AudioFormat_Other = 8
+} DVD_AUDIO_FORMAT;
+
+typedef enum tagDVD_KARAOKE_DOWNMIX
+{
+ DVD_Mix_0to0 = 0x0001,
+ DVD_Mix_1to0 = 0x0002,
+ DVD_Mix_2to0 = 0x0004,
+ DVD_Mix_3to0 = 0x0008,
+ DVD_Mix_4to0 = 0x0010,
+ DVD_Mix_Lto0 = 0x0020,
+ DVD_Mix_Rto0 = 0x0040,
+ DVD_Mix_0to1 = 0x0100,
+ DVD_Mix_1to1 = 0x0200,
+ DVD_Mix_2to1 = 0x0400,
+ DVD_Mix_3to1 = 0x0800,
+ DVD_Mix_4to1 = 0x1000,
+ DVD_Mix_Lto1 = 0x2000,
+ DVD_Mix_Rto1 = 0x4000
+} DVD_KARAOKE_DOWNMIX;
+
+typedef enum tagDVD_KARAOKE_CONTENTS
+{
+ DVD_Karaoke_GuideVocal1 = 0x0001,
+ DVD_Karaoke_GuideVocal2 = 0x0002,
+ DVD_Karaoke_GuideMelody1 = 0x0004,
+ DVD_Karaoke_GuideMelody2 = 0x0008,
+ DVD_Karaoke_GuideMelodyA = 0x0010,
+ DVD_Karaoke_GuideMelodyB = 0x0020,
+ DVD_Karaoke_SoundEffectA = 0x0040,
+ DVD_Karaoke_SoundEffectB = 0x0080
+} DVD_KARAOKE_CONTENTS;
+
+typedef enum tagDVD_KARAOKE_ASSIGNMENT
+{
+ DVD_Assignment_reserved0 = 0,
+ DVD_Assignment_reserved1 = 1,
+ DVD_Assignment_LR = 2,
+ DVD_Assignment_LRM = 3,
+ DVD_Assignment_LR1 = 4,
+ DVD_Assignment_LRM1 = 5,
+ DVD_Assignment_LR12 = 6,
+ DVD_Assignment_LRM12 = 7
+} DVD_KARAOKE_ASSIGNMENT;
+
+typedef struct tagDVD_MUA_MixingInfo
+{
+ BOOL fMixTo0;
+ BOOL fMixTo1;
+ BOOL fMix0InPhase;
+ BOOL fMix1InPhase;
+ DWORD dwSpeakerPosition;
+} DVD_MUA_MixingInfo;
+
+typedef struct tagDVD_MUA_Coeff
+{
+ double log2_alpha;
+ double log2_beta;
+} DVD_MUA_Coeff;
+
+typedef enum tagDVD_VIDEO_COMPRESSION
+{
+ DVD_VideoCompression_Other = 0,
+ DVD_VideoCompression_MPEG1 = 1,
+ DVD_VideoCompression_MPEG2 = 2
+} DVD_VIDEO_COMPRESSION;
+
+typedef enum tagDVD_SUBPICTURE_TYPE
+{
+ DVD_SPType_NotSpecified = 0,
+ DVD_SPType_Language = 1,
+ DVD_SPType_Other = 2
+} DVD_SUBPICTURE_TYPE;
+
+typedef enum tagDVD_SUBPICTURE_CODING
+{
+ DVD_SPCoding_RunLength = 0,
+ DVD_SPCoding_Extended = 1,
+ DVD_SPCoding_Other = 2
+} DVD_SUBPICTURE_CODING;
+
+typedef enum tagDVD_TITLE_APPMODE
+{
+ DVD_AppMode_Not_Specified = 0,
+ DVD_AppMode_Karaoke = 1,
+ DVD_AppMode_Other = 3
+} DVD_TITLE_APPMODE;
+
+enum DVD_TextStringType
+{
+ DVD_Struct_Volume = 0x01,
+ DVD_Struct_Title = 0x02,
+ DVD_Struct_ParentalID = 0x03,
+ DVD_Struct_PartOfTitle = 0x04,
+ DVD_Struct_Cell = 0x05,
+ DVD_Stream_Audio = 0x10,
+ DVD_Stream_Subpicture = 0x11,
+ DVD_Stream_Angle = 0x12,
+ DVD_Channel_Audio = 0x20,
+ DVD_General_Name = 0x30,
+ DVD_General_Comments = 0x31,
+ DVD_Title_Series = 0x38,
+ DVD_Title_Movie = 0x39,
+ DVD_Title_Video = 0x3a,
+ DVD_Title_Album = 0x3b,
+ DVD_Title_Song = 0x3c,
+ DVD_Title_Other = 0x3f,
+ DVD_Title_Sub_Series = 0x40,
+ DVD_Title_Sub_Movie = 0x41,
+ DVD_Title_Sub_Video = 0x42,
+ DVD_Title_Sub_Album = 0x43,
+ DVD_Title_Sub_Song = 0x44,
+ DVD_Title_Sub_Other = 0x47,
+ DVD_Title_Orig_Series = 0x48,
+ DVD_Title_Orig_Movie = 0x49,
+ DVD_Title_Orig_Video = 0x4a,
+ DVD_Title_Orig_Album = 0x4b,
+ DVD_Title_Orig_Song = 0x4c,
+ DVD_Title_Orig_Other = 0x4f,
+ DVD_Other_Scene = 0x50,
+ DVD_Other_Cut = 0x51,
+ DVD_Other_Take = 0x52
+};
+
+enum DVD_TextCharSet
+{
+ DVD_CharSet_Unicode = 0,
+ DVD_CharSet_ISO646 = 1,
+ DVD_CharSet_JIS_Roman_Kanji = 2,
+ DVD_CharSet_ISO8859_1 = 3,
+ DVD_CharSet_ShiftJIS_Kanji_Roman_Katakana = 4
+};
+
+typedef struct tagDVD_AudioAttributes
+{
+ DVD_AUDIO_APPMODE AppMode;
+ BYTE AppModeData;
+ DVD_AUDIO_FORMAT AudioFormat;
+ LCID Language;
+ DVD_AUDIO_LANG_EXT LanguageExtension;
+ BOOL fHasMultichannelInfo;
+ DWORD dwFrequency;
+ BYTE bQuantization;
+ BYTE bNumberOfChannels;
+ DWORD dwReserved[2];
+} DVD_AudioAttributes;
+
+typedef struct tagDVD_MultichannelAudioAttributes
+{
+ DVD_MUA_MixingInfo Info[8];
+ DVD_MUA_Coeff Coeff[8];
+} DVD_MultichannelAudioAttributes;
+
+typedef struct tagDVD_VideoAttributes
+{
+ BOOL fPanscanPermitted;
+ BOOL fLetterboxPermitted;
+ ULONG ulAspectX;
+ ULONG ulAspectY;
+ ULONG ulFrameRate;
+ ULONG ulFrameHeight;
+ DVD_VIDEO_COMPRESSION Compression;
+ BOOL fLine21Field1InGOP;
+ BOOL fLine21Field2InGOP;
+ ULONG ulSourceResolutionX;
+ ULONG ulSourceResolutionY;
+ BOOL fIsSourceLetterboxed;
+ BOOL fIsFilmMode;
+} DVD_VideoAttributes;
+
+typedef struct tagDVD_SubpictureAttributes
+{
+ DVD_SUBPICTURE_TYPE Type;
+ DVD_SUBPICTURE_CODING CodingMode;
+ LCID Language;
+ DVD_SUBPICTURE_LANG_EXT LanguageExtension;
+} DVD_SubpictureAttributes;
+
+typedef struct tagDVD_KaraokeAttributes
+{
+ BYTE bVersion;
+ BOOL fMasterOfCeremoniesInGuideVocal1;
+ BOOL fDuet;
+ DVD_KARAOKE_ASSIGNMENT ChannelAssignment;
+ WORD wChannelContents[8];
+} DVD_KaraokeAttributes;
+
+typedef struct tagDVD_TitleMainAttributes
+{
+ union
+ {
+ DVD_TITLE_APPMODE AppMode;
+ DVD_HMSF_TIMECODE TitleLength;
+ } DUMMYUNIONNAME;
+ DVD_VideoAttributes VideoAttributes;
+ ULONG ulNumberOfAudioStreams;
+ DVD_AudioAttributes AudioAttributes[8];
+ DVD_MultichannelAudioAttributes MultichannelAudioAttributes[8];
+ ULONG ulNumberOfSubpictureStreams;
+ DVD_SubpictureAttributes SubpictureAttributes[32];
+} DVD_TitleAttributes;
+
+typedef struct tagDVD_MenuAttributes
+{
+ BOOL fCompatibleRegion[8];
+ DVD_VideoAttributes VideoAttributes;
+ BOOL fAudioPresent;
+ DVD_AudioAttributes AudioAttributes;
+ BOOL fSubpicturePresent;
+ DVD_SubpictureAttributes SubpictureAttributes;
+} DVD_MenuAttributes;
+
+cpp_quote ("#define DVD_TITLE_MENU 0x000")
+cpp_quote ("#define DVD_STREAM_DATA_VMGM 0x400")
+cpp_quote ("#define DVD_STREAM_DATA_VTSM 0x401")
+cpp_quote ("#define DVD_STREAM_DATA_CURRENT 0x800")
+cpp_quote ("#define DVD_DEFAULT_AUDIO_STREAM 0x00f")
+
+cpp_quote ("#define DVD_AUDIO_CAPS_AC3 0x00000001")
+cpp_quote ("#define DVD_AUDIO_CAPS_MPEG2 0x00000002")
+cpp_quote ("#define DVD_AUDIO_CAPS_LPCM 0x00000004")
+cpp_quote ("#define DVD_AUDIO_CAPS_DTS 0x00000008")
+cpp_quote ("#define DVD_AUDIO_CAPS_SDDS 0x00000010")
+
+typedef struct tagDVD_DECODER_CAPS
+{
+ DWORD dwSize;
+ DWORD dwAudioCaps;
+ double dFwdMaxRateVideo;
+ double dFwdMaxRateAudio;
+ double dFwdMaxRateSP;
+ double dBwdMaxRateVideo;
+ double dBwdMaxRateAudio;
+ double dBwdMaxRateSP;
+ DWORD dwRes1;
+ DWORD dwRes2;
+ DWORD dwRes3;
+ DWORD dwRes4;
+} DVD_DECODER_CAPS;
+
+typedef enum _AM_DVD_GRAPH_FLAGS
+{
+ AM_DVD_HWDEC_PREFER = 0x0001,
+ AM_DVD_HWDEC_ONLY = 0x0002,
+ AM_DVD_SWDEC_PREFER = 0x0004,
+ AM_DVD_SWDEC_ONLY = 0x0008,
+ AM_DVD_NOVPE = 0x0100,
+ AM_DVD_DO_NOT_CLEAR = 0x0200,
+ AM_DVD_VMR9_ONLY = 0x0800,
+ AM_DVD_EVR_ONLY = 0x1000,
+ AM_DVD_EVR_QOS = 0x2000,
+ AM_DVD_ADAPT_GRAPH = 0x4000,
+ AM_DVD_MASK = 0xffff
+} AM_DVD_GRAPH_FLAGS;
+
+typedef enum _AM_DVD_STREAM_FLAGS
+{
+ AM_DVD_STREAM_VIDEO = 0x01,
+ AM_DVD_STREAM_AUDIO = 0x02,
+ AM_DVD_STREAM_SUBPIC = 0x04
+} AM_DVD_STREAM_FLAGS;
+
+typedef struct tagAM_DVD_RENDERSTATUS
+{
+ HRESULT hrVPEStatus;
+ BOOL bDvdVolInvalid;
+ BOOL bDvdVolUnknown;
+ BOOL bNoLine21In;
+ BOOL bNoLine21Out;
+ int iNumStreams;
+ int iNumStreamsFailed;
+ DWORD dwFailedStreamsFlag;
+} AM_DVD_RENDERSTATUS;
+
+[
+ local,
+ object,
+ uuid(a70efe61-e2a3-11d0-a9be-00aa0061be93),
+]
+interface IDvdControl : IUnknown
+{
+ HRESULT TitlePlay([in] ULONG title);
+ HRESULT ChapterPlay([in] ULONG title, [in] ULONG chapter);
+ HRESULT TimePlay([in] ULONG title, [in] ULONG time);
+ HRESULT StopForResume();
+ HRESULT GoUp();
+ HRESULT TimeSearch([in] ULONG time);
+ HRESULT ChapterSearch([in] ULONG chapter);
+ HRESULT PrevPGSearch();
+ HRESULT TopPGSearch();
+ HRESULT NextPGSearch();
+ HRESULT ForwardScan([in] double speed);
+ HRESULT BackwardScan([in] double speed);
+ HRESULT MenuCall([in] DVD_MENU_ID id);
+ HRESULT Resume();
+ HRESULT UpperButtonSelect();
+ HRESULT LowerButtonSelect();
+ HRESULT LeftButtonSelect();
+ HRESULT RightButtonSelect();
+ HRESULT ButtonActivate();
+ HRESULT ButtonSelectActivate([in] ULONG button);
+ HRESULT StillOff();
+ HRESULT PauseOn();
+ HRESULT PauseOff();
+ HRESULT MenuLanguageSelect([in] LCID language);
+ HRESULT AudioStreamChange([in] ULONG audio);
+ HRESULT SubpictureStreamChange([in] ULONG subpicture, [in] BOOL enable);
+ HRESULT AngleChange([in] ULONG angle);
+ HRESULT ParentalLevelSelect([in] ULONG level);
+ HRESULT ParentalCountrySelect([in] WORD country);
+ HRESULT KaraokeAudioPresentationModeChange([in] ULONG mode);
+ HRESULT VideoModePreference([in] ULONG mode);
+ HRESULT SetRoot([in] const WCHAR *path);
+ HRESULT MouseActivate([in] POINT point);
+ HRESULT MouseSelect([in] POINT point);
+ HRESULT ChapterPlayAutoStop([in] ULONG title, [in] ULONG chapter, [in] ULONG count);
+}
+
+[
+ local,
+ object,
+ uuid(a70efe60-e2a3-11d0-a9be-00aa0061be93),
+]
+interface IDvdInfo : IUnknown
+{
+ HRESULT GetCurrentDomain([out] DVD_DOMAIN *domain);
+ HRESULT GetCurrentLocation([out] DVD_PLAYBACK_LOCATION *location);
+ HRESULT GetTotalTitleTime([out] ULONG *time);
+ HRESULT GetCurrentButton([out] ULONG *count, [out] ULONG *current);
+ HRESULT GetCurrentAngle([out] ULONG *count, [out] ULONG *current);
+ HRESULT GetCurrentAudio([out] ULONG *count, [out] ULONG *current);
+ HRESULT GetCurrentSubpicture([out] ULONG *count, [out] ULONG *current, [out] BOOL *enable);
+ HRESULT GetCurrentUOPS([out] VALID_UOP_SOMTHING_OR_OTHER *uops);
+ HRESULT GetAllSPRMs([out] SPRMARRAY *regs);
+ HRESULT GetAllGPRMs([out] GPRMARRAY *regs);
+ HRESULT GetAudioLanguage([in] ULONG stream, [out] LCID *language);
+ HRESULT GetSubpictureLanguage([in] ULONG stream, [out] LCID *language);
+ HRESULT GetTitleAttributes([in] ULONG title, [out] DVD_ATR *attr);
+ HRESULT GetVMGAttributes([out] DVD_ATR *attr);
+ HRESULT GetCurrentVideoAttributes([out] DVD_VideoATR *attr);
+ HRESULT GetCurrentAudioAttributes([out] DVD_AudioATR *attr);
+ HRESULT GetCurrentSubpictureAttributes([out] DVD_SubpictureATR *attr);
+ HRESULT GetCurrentVolumeInfo([out] ULONG *volume_count, [out] ULONG *current, [out] DVD_DISC_SIDE *side, [out] ULONG *title_count);
+ HRESULT GetDVDTextInfo([out, size_is(size)] BYTE *text_manager, [in] ULONG size, [out] ULONG *ret_size);
+ HRESULT GetPlayerParentalLevel([out] ULONG *level, [out] ULONG *country_code);
+ HRESULT GetNumberOfChapters([in] ULONG title, [out] ULONG *count);
+ HRESULT GetTitleParentalLevels([in] ULONG title, [out] ULONG *levels);
+ HRESULT GetRoot([out, size_is(size)] char *path, [in] ULONG size, [out] ULONG *ret_size);
+}
+
+[
+ local,
+ object,
+ uuid(5a4a97e4-94ee-4a55-9751-74b5643aa27d),
+]
+interface IDvdCmd : IUnknown
+{
+ HRESULT WaitForStart();
+ HRESULT WaitForEnd();
+}
+
+[
+ local,
+ object,
+ uuid(86303d6d-1c4a-4087-ab42-f711167048ef),
+]
+interface IDvdState : IUnknown
+{
+ HRESULT GetDiscID([out] ULONGLONG *id);
+ HRESULT GetParentalLevel([out] ULONG *level);
+}
+
+[
+ local,
+ object,
+ uuid(33bc7430-eec0-11d2-8201-00a0c9d74842),
+]
+interface IDvdControl2 : IUnknown
+{
+ HRESULT PlayTitle([in] ULONG title, [in] DWORD flags, [out] IDvdCmd **cmd);
+ HRESULT PlayChapterInTitle([in] ULONG title, [in] ULONG chapter, [in] DWORD flags, [out] IDvdCmd **cmd);
+ HRESULT PlayTimeInTitle([in] ULONG title, [in] DVD_HMSF_TIMECODE *time, [in] DWORD flags, [out] IDvdCmd **cmd);
+ HRESULT Stop();
+ HRESULT ReturnFromSubmenu([in] DWORD flags, [out] IDvdCmd **cmd);
+ HRESULT PlayAtTime([in] DVD_HMSF_TIMECODE *time, [in] DWORD flags, [out] IDvdCmd **cmd);
+ HRESULT PlayChapter([in] ULONG chapter, [in] DWORD flags, [out] IDvdCmd **cmd);
+ HRESULT PlayPrevChapter([in] DWORD flags, [out] IDvdCmd **cmd);
+ HRESULT ReplayChapter([in] DWORD flags, [out] IDvdCmd **cmd);
+ HRESULT PlayNextChapter([in] DWORD flags, [out] IDvdCmd **cmd);
+ HRESULT PlayForwards([in] double speed, [in] DWORD flags, [out] IDvdCmd **cmd);
+ HRESULT PlayBackwards([in] double speed, [in] DWORD flags, [out] IDvdCmd **cmd);
+ HRESULT ShowMenu([in] DVD_MENU_ID id, [in] DWORD flags, [out] IDvdCmd **cmd);
+ HRESULT Resume([in] DWORD flags, [out] IDvdCmd **cmd);
+ HRESULT SelectRelativeButton([in] DVD_RELATIVE_BUTTON button);
+ HRESULT ActivateButton();
+ HRESULT SelectButton([in] ULONG button);
+ HRESULT SelectAndActivateButton([in] ULONG button);
+ HRESULT StillOff();
+ HRESULT Pause([in] BOOL enable);
+ HRESULT SelectAudioStream([in] ULONG stream, [in] DWORD flags, [out] IDvdCmd **cmd);
+ HRESULT SelectSubpictureStream([in] ULONG stream, [in] DWORD flags, [out] IDvdCmd **cmd);
+ HRESULT SetSubpictureState([in] BOOL enable, [in] DWORD flags, [out] IDvdCmd **cmd);
+ HRESULT SelectAngle([in] ULONG angle, [in] DWORD flags, [out] IDvdCmd **cmd);
+ HRESULT SelectParentalLevel([in] ULONG level);
+ HRESULT SelectParentalCountry([in] BYTE country[2]);
+ HRESULT SelectKaraokeAudioPresentationMode([in] ULONG mode);
+ HRESULT SelectVideoModePreference([in] ULONG mode);
+ HRESULT SetDVDDirectory([in] const WCHAR *path);
+ HRESULT ActivateAtPosition([in] POINT point);
+ HRESULT SelectAtPosition([in] POINT point);
+ HRESULT PlayChaptersAutoStop([in] ULONG title, [in] ULONG chapter, [in] ULONG count, [in] DWORD flags, [out] IDvdCmd **cmd);
+ HRESULT AcceptParentalLevelChange([in] BOOL accept);
+ HRESULT SetOption([in] DVD_OPTION_FLAG flag, [in] BOOL option);
+ HRESULT SetState([in] IDvdState *state, [in] DWORD flags, [out] IDvdCmd **cmd);
+ HRESULT PlayPeriodInTitleAutoStop([in] ULONG title, [in] DVD_HMSF_TIMECODE *start_time, [in] DVD_HMSF_TIMECODE *end_time, [in] DWORD flags, [out] IDvdCmd **cmd);
+ HRESULT SetGRPM([in] ULONG index, [in] WORD value, [in] DWORD flags, [out] IDvdCmd **cmd);
+ HRESULT SelectDefaultMenuLanguage([in] LCID language);
+ HRESULT SelectDefaultAudioLanguage([in] LCID language, [in] DVD_AUDIO_LANG_EXT extension);
+ HRESULT SelectDefaultSubpictureLanguage([in] LCID language, [in] DVD_SUBPICTURE_LANG_EXT extension);
+}
+
+[
+ local,
+ object,
+ uuid(34151510-eec0-11d2-8201-00a0c9d74842),
+]
+interface IDvdInfo2 : IUnknown
+{
+ HRESULT GetCurrentDomain([out] DVD_DOMAIN *domain);
+ HRESULT GetCurrentLocation([out] DVD_PLAYBACK_LOCATION2 *location);
+ HRESULT GetTotalTitleTime([out] DVD_HMSF_TIMECODE *time, [out] ULONG *flags);
+ HRESULT GetCurrentButton([out] ULONG *count, [out] ULONG *current);
+ HRESULT GetCurrentAngle([out] ULONG *count, [out] ULONG *current);
+ HRESULT GetCurrentAudio([out] ULONG *count, [out] ULONG *current);
+ HRESULT GetCurrentSubpicture([out] ULONG *count, [out] ULONG *current, [out] BOOL *enable);
+ HRESULT GetCurrentUOPS([out] ULONG *uops);
+ HRESULT GetAllSPRMs([out] SPRMARRAY *regs);
+ HRESULT GetAllGPRMs([out] GPRMARRAY *regs);
+ HRESULT GetAudioLanguage([in] ULONG stream, [out] LCID *language);
+ HRESULT GetSubpictureLanguage([in] ULONG stream, [out] LCID *language);
+ HRESULT GetTitleAttributes([in] ULONG index, [out] DVD_MenuAttributes *menu, [out] DVD_TitleAttributes *title);
+ HRESULT GetVMGAttributes([out] DVD_MenuAttributes *attr);
+ HRESULT GetVideoAttributes([out] DVD_VideoAttributes *attr);
+ HRESULT GetAudioAttributes([in] ULONG stream, [out] DVD_AudioAttributes *attr);
+ HRESULT GetKaraokeAttributes([in] ULONG stream, [out] DVD_KaraokeAttributes *attr);
+ HRESULT GetSubpictureAttributes([in] ULONG stream, [out] DVD_SubpictureAttributes *attr);
+ HRESULT GetCurrentVolumeInfo([out] ULONG *volume_count, [out] ULONG *current, [out] DVD_DISC_SIDE *side, [out] ULONG *title_count);
+ HRESULT GetDVDTextNumberOfLanguages([out] ULONG *count);
+ HRESULT GetDVDTextLanguageInfo([in] ULONG index, [out] ULONG *string_count, [out] LCID *language, [out] enum DVD_TextCharSet *character_set);
+ HRESULT GetDVDTextStringAsNative([in] ULONG lang_index, [in] ULONG string_index, [out] BYTE *string, [in] ULONG size, [out] ULONG *ret_size, [out] enum DVD_TextStringType *type);
+ HRESULT GetDVDTextStringAsUnicode([in] ULONG lang_index, [in] ULONG string_index, [out] WCHAR *string, [in] ULONG size, [out] ULONG *ret_size, [out] enum DVD_TextStringType *type);
+ HRESULT GetPlayerParentalLevel([out] ULONG *level, [out] BYTE country_code[2]);
+ HRESULT GetNumberOfChapters([in] ULONG title, [out] ULONG *count);
+ HRESULT GetTitleParentalLevels([in] ULONG title, [out] ULONG *levels);
+ HRESULT GetDVDDirectory([out, size_is(size)] WCHAR *path, [in] ULONG size, [out] ULONG *ret_size);
+ HRESULT IsAudioStreamEnabled([in] ULONG stream, [out] BOOL *enable);
+ HRESULT GetDiscID([in] const WCHAR *path, [out] ULONGLONG *id);
+ HRESULT GetState([out] IDvdState **state);
+ HRESULT GetMenuLanguages([out] LCID *languages, [in] ULONG count, [out] ULONG *ret_count);
+ HRESULT GetButtonAtPosition([in] POINT point, [out] ULONG *button);
+ HRESULT GetCmdFromEvent([in] LONG_PTR param, [out] IDvdCmd **cmd);
+ HRESULT GetDefaultMenuLanguage([out] LCID *language);
+ HRESULT GetDefaultAudioLanguage([out] LCID *language, [out] DVD_AUDIO_LANG_EXT *extension);
+ HRESULT SelectDefaultSubpictureLanguage([out] LCID *language, [out] DVD_SUBPICTURE_LANG_EXT *extension);
+ HRESULT GetDecoderCaps([out] DVD_DECODER_CAPS *caps);
+ HRESULT GetButtonRect([in] ULONG button, [out] RECT *rect);
+ HRESULT IsSubpictureStreamEnabled([in] ULONG stream, [out] BOOL *enable);
+}
+
+[
+ local,
+ object,
+ uuid(fcc152b6-f372-11d0-8e00-00c04fd7c08b),
+]
+interface IDvdGraphBuilder : IUnknown
+{
+ HRESULT GetFiltergraph([out] IGraphBuilder **graph);
+ HRESULT GetDvdInterface([in] REFIID iid, [out] void **out);
+ HRESULT RenderDvdVideoVolume([in] const WCHAR *path, [in] DWORD flags, [out] AM_DVD_RENDERSTATUS *status);
+}
diff --git a/include/strmif.idl b/include/strmif.idl
index a06f99b751..8c140dcbfd 100644
--- a/include/strmif.idl
+++ b/include/strmif.idl
@@ -20,12 +20,8 @@ import "unknwn.idl";
import "objidl.idl";
#include <devenum.idl>
-
#include <axcore.idl>
-
#include <axextend.idl>
-
#include <dyngraph.idl>
-
-/* TODO: #include <dvdif.h> */
#include <vmrender.idl>
+#include <dvdif.idl>
--
2.26.2
April 30, 2020
Re: [PATCH 1/5] kernelbase/locale: Implement sortkey generation on official tables
by Zebediah Figura
On 4/28/20 1:17 PM, Fabian Maurer wrote:
> Signed-off-by: Fabian Maurer <dark.shadow4(a)web.de>
> ---
> dlls/kernel32/tests/locale.c | 110 ++++++++
> dlls/kernelbase/locale.c | 477 ++++++++++++++++++++++++++---------
> 2 files changed, 464 insertions(+), 123 deletions(-)
>
So as far as I understand, the sort key algorithm writes the level 0
weights (script and alphabetic weight) for the whole string to the sort
key, then the level 1 weights (diacritic), and so on, right?
In that case, what seems potentially simpler to me is to calculate those
weights one level at a time, rather than one character at a time. That
is, you'd end up doing something like
static int get_sortkey( DWORD flags, const WCHAR *src, int srclen, char
*dst, int dstlen )
{
int used = 0;
for (i = 0; i < srclen; ++i)
{
used += get_main_weights(src[i], dst + used, dstlen - used);
if (!(flags & NORM_IGNORENONSPACE))
used += get_diacritic_weights(src[i], dst + used, dstlen -
used);
...
}
}
This avoids the need to store temporary buffers.
As that example shows, I also think it's probably simpler to just pass
the buffer directly to whatever functions are writing sortkey bytes into it.
> diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c
> index 4c1e1b4d73..13839bb10a 100644
> --- a/dlls/kernel32/tests/locale.c
> +++ b/dlls/kernel32/tests/locale.c
> @@ -2681,6 +2681,13 @@ static void test_lcmapstring_unicode(lcmapstring_wrapper func_ptr, const char *f
> lstrlenW(symbols_stripped) + 1, ret);
> ok(!lstrcmpW(buf, symbols_stripped), "%s string comparison mismatch\n", func_name);
>
> + /* test small buffer */
> + lstrcpyW(buf, fooW);
> + ret = func_ptr(LCMAP_SORTKEY, lower_case, -1, buf, 2);
> + ok(ret == 0, "Expected a failure\n");
> + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER,
> + "%s unexpected error code %d\n", func_name, GetLastError());;
> +
> /* test srclen = 0 */
> SetLastError(0xdeadbeef);
> ret = func_ptr(0, upper_case, 0, buf, ARRAY_SIZE(buf));
> @@ -3108,6 +3115,108 @@ static void test_sorting(void)
> }
> }
>
> +struct sorting_test_entry {
> + const WCHAR* locale;
> + DWORD flags;
> + const WCHAR* first;
> + const WCHAR* second;
> + int result_sortkey;
> + int result_compare;
> + BOOL broken_on_old_win;
> +};
> +
> +static const struct sorting_test_entry unicode_sorting_tests[] =
> +{
> + /* 0 */ { L"en-US", 0, L"\ue6e3\u0a02", L"\ue6e3\u20dc", CSTR_LESS_THAN, 0, TRUE }, /* Test default character, when there is main weight extra there must be no diacritic weight */
> + /* 1 */ { L"en-US", 0, L"\u276a", L"\u2768", CSTR_GREATER_THAN }, /* Test symbols, must add diacritic weight */
> + /* 2 */ { L"en-US", 0, L"\u204d", L"\uff02", CSTR_LESS_THAN }, /* Test symbols, must add case weight */
> + /* 3 */ { L"en-US", 0, L"a \u2060 b", L"a b", CSTR_EQUAL }, /* Test unsortable characters */
> + /* 4 */ { L"en-US", 0, L"a \xfff0 b", L"a b", CSTR_EQUAL }, /* Test invalid characters */
> + /* 5 */ { L"en-US", 0, L"\x00fc", L"\x016d", CSTR_LESS_THAN },
> + /* 6 */ { L"en-US", 0, L"\x3fcb\x7fd5", L"\x0006\x3032", CSTR_GREATER_THAN },
> + /* 7 */ { L"en-US", 0, L"\x00fc\x30fd", L"\x00fa\x1833", CSTR_LESS_THAN },
> + /* 8 */ { L"en-US", 0, L"\x0037", L"\x277c", CSTR_LESS_THAN, 0, TRUE }, /* Normal character */
> + /* 9 */ { L"en-US", 0, L"\x1eca", L"\x1ecb", CSTR_GREATER_THAN }, /* Normal character */
> + /* 10 */ { L"en-US", 0, L"\x1d05", L"\x1d48", CSTR_GREATER_THAN }, /* Normal character */
> + /* 11 */ { L"en-US", 0, L"\x19d7", L"\x096d", CSTR_GREATER_THAN }, /* Normal character diacritics */
> + /* 12 */ { L"en-US", 0, L"\x00f5", L"\x1ecf", CSTR_LESS_THAN }, /* Normal character diacritics */
> + /* 13 */ { L"en-US", 0, L"\x2793", L"\x0d70", CSTR_LESS_THAN, 0, TRUE }, /* Normal character diacritics */
> + /* 14 */ { L"en-US", 0, L"A", L"a", CSTR_GREATER_THAN }, /* Normal character case weights */
> + /* 15 */ { L"en-US", 0, L"z", L"Z", CSTR_LESS_THAN }, /* Normal character case weights */
> + /* 16 */ { L"en-US", 0, L"\xe5a6", L"\xe5a5\x0333", CSTR_GREATER_THAN, 0, TRUE }, /* CJK with extra value */
> + /* 17 */ { L"en-US", 0, L"\xe5d7", L"\xe5d6\x0330", CSTR_GREATER_THAN, 0, TRUE }, /* CJK with extra value */
> + /* 18 */ { L"en-US", 0, L"\x1B56\x0330", L"\x1096", CSTR_GREATER_THAN }, /* Diacritic is added */
> + /* 19 */ { L"en-US", 0, L"\x1817\x0333", L"\x19d7", CSTR_GREATER_THAN }, /* Diacritic is added */
> + /* 20 */ { L"en-US", 0, L"\x04de\x05ac", L"\x0499", CSTR_GREATER_THAN }, /* Diacritic is added */
> + /* 21 */ { L"en-US", 0, L"\x01ba\x0654", L"\x01b8", CSTR_LESS_THAN }, /* Diacritic can overflow */
> + /* 22 */ { L"en-US", 0, L"\x06b7\x06eb", L"\x06b6", CSTR_LESS_THAN }, /* Diacritic can overflow */
> + /* 23 */ { L"en-US", 0, L"\x1420\x0333", L"\x141f", CSTR_LESS_THAN }, /* Diacritic can overflow */
> + /* 24 */ { L"en-US", 0, L"\x11bc", L"\x110b", CSTR_GREATER_THAN }, /* Jamo case weight */
> + /* 25 */ { L"en-US", 0, L"\x11c1", L"\x1111", CSTR_GREATER_THAN }, /* Jamo case weight */
> + /* 26 */ { L"en-US", 0, L"\x11af", L"\x1105", CSTR_GREATER_THAN }, /* Jamo case weight */
> + /* 27 */ { L"en-US", 0, L"\x11c2", L"\x11f5", CSTR_LESS_THAN }, /* Jamo main weight */
> + /* 28 */ { L"en-US", 0, L"\x1108", L"\x1121", CSTR_LESS_THAN }, /* Jamo main weight */
> + /* 29 */ { L"en-US", 0, L"\x1116", L"\x11c7", CSTR_LESS_THAN }, /* Jamo main weight */
> + /* 30 */ { L"en-US", 0, L"\x11b1", L"\x11d1", CSTR_LESS_THAN }, /* Jamo main weight */
> + /* 31 */ { L"en-US", 0, L"\x4550\x73d2", L"\x3211\x23ad", CSTR_GREATER_THAN }, /* Script 5 main weight 1 */
> + /* 32 */ { L"en-US", 0, L"\x3265", L"\x4079", CSTR_LESS_THAN }, /* Script 5 main weight 1 */
> + /* 33 */ { L"en-US", 0, L"\x4c19\x68d0\x52d0", L"\x316d", CSTR_GREATER_THAN }, /* Script 5 main weight 1 */
> + /* 34 */ { L"en-US", 0, L"\x72dd", L"\x6b8a", CSTR_GREATER_THAN }, /* Script 5 main weight 2 */
> + /* 35 */ { L"en-US", 0, L"\x6785\x3bff\x6f83", L"\x7550\x34c9\x71a7", CSTR_LESS_THAN }, /* Script 5 main weight 2 */
> + /* 36 */ { L"en-US", 0, L"\x5d61", L"\x3aef", CSTR_LESS_THAN }, /* Script 5 main weight 2 */
> + /* 37 */ { L"en-US", 0, L"\x207a", L"\xfe62", CSTR_GREATER_THAN }, /* Symbols case weights */
> + /* 38 */ { L"en-US", 0, L"\xfe65", L"\xff1e", CSTR_GREATER_THAN }, /* Symbols case weights */
> + /* 39 */ { L"en-US", 0, L"\x2502", L"\xffe8", CSTR_GREATER_THAN }, /* Symbols case weights */
> + /* 40 */ { L"en-US", 0, L"\x21da", L"\x21dc", CSTR_LESS_THAN }, /* Symbols diacritic weights */
> + /* 41 */ { L"en-US", 0, L"\x29fb", L"\x2295", CSTR_LESS_THAN }, /* Symbols diacritic weights */
> + /* 42 */ { L"en-US", 0, L"\x0092", L"\x009c", CSTR_LESS_THAN }, /* Symbols diacritic weights */
> + /* 43 */ { L"en-US", NORM_IGNORESYMBOLS, L"\x21da", L"\x21dc", CSTR_EQUAL }, /* NORM_IGNORESYMBOLS */
> + /* 44 */ { L"en-US", NORM_IGNORESYMBOLS, L"\x29fb", L"\x2295", CSTR_EQUAL }, /* NORM_IGNORESYMBOLS */
> + /* 45 */ { L"en-US", NORM_IGNORESYMBOLS, L"\x0092", L"\x009c", CSTR_EQUAL }, /* NORM_IGNORESYMBOLS */
> + /* 46 */ { L"en-US", 0, L"\x3099", L"\x309a", CSTR_EQUAL }, /* MIN_WEIGHT */
> + /* 47 */ { L"en-US", 0, L"\x309b", L"\x05a2", CSTR_EQUAL }, /* MIN_WEIGHT */
> + /* 48 */ { L"en-US", 0, L"\xff9e", L"\x0e47", CSTR_EQUAL }, /* MIN_WEIGHT */
> +};
> +
> +static void test_unicode_sorting(void)
> +{
> + int i;
> + if (!pLCMapStringEx)
> + {
> +
> + win_skip("LCMapStringEx not available\n");
> + return;
> + }
> + for (i = 0; i < ARRAY_SIZE(unicode_sorting_tests); i++)
> + {
> + int pos;
> + BYTE buff1[1000];
> + BYTE buff2[1000];
> + int len1, len2;
> + int result = CSTR_EQUAL;
> + const struct sorting_test_entry* entry = &unicode_sorting_tests[i];
> +
> + len1 = pLCMapStringEx(entry->locale, LCMAP_SORTKEY | entry->flags, entry->first, -1, (WCHAR*)buff1, ARRAY_SIZE(buff1), NULL, NULL, 0);
> + len2 = pLCMapStringEx(entry->locale, LCMAP_SORTKEY | entry->flags, entry->second, -1, (WCHAR*)buff2, ARRAY_SIZE(buff2), NULL, NULL, 0);
Is there a reason to use LCMapStringEx() here rather than LCMapString()?
> +
> + for (pos = 0; pos < len1 && pos < len2; pos++)
> + {
> + if (buff1[pos] > buff2[pos])
> + {
> + result = CSTR_GREATER_THAN;
> + break;
> + }
> + else if (buff1[pos] < buff2[pos])
> + {
> + result = CSTR_LESS_THAN;
> + break;
> + }
> + }
> +
> + ok (result == entry->result_sortkey || broken(entry->broken_on_old_win), "Test %d - Expected %d, got %d\n", i, entry->result_sortkey, result);
> + }
> +}
> +
> static void test_FoldStringA(void)
> {
> int ret, i, j;
> @@ -6897,4 +7006,5 @@ START_TEST(locale)
> test_NLSVersion();
> /* this requires collation table patch to make it MS compatible */
> if (0) test_sorting();
The fact that this test is commented out never struck me as great. I'm
pretty sure that with todo_wine added as appropriate, it could pass. A
first patch in this series could be to do that.
> + test_unicode_sorting();
> }
> diff --git a/dlls/kernelbase/locale.c b/dlls/kernelbase/locale.c
> index 53e4e42da3..74177371d9 100644
> --- a/dlls/kernelbase/locale.c
> +++ b/dlls/kernelbase/locale.c
> @@ -2126,127 +2126,6 @@ static int wcstombs_codepage( UINT codepage, DWORD flags, const WCHAR *src, int
> return wcstombs_sbcs( info, src, srclen, dst, dstlen );
> }
>
> -
> -static int get_sortkey( DWORD flags, const WCHAR *src, int srclen, char *dst, int dstlen )
> -{
> - WCHAR dummy[4]; /* no decomposition is larger than 4 chars */
> - int key_len[4];
> - char *key_ptr[4];
> - const WCHAR *src_save = src;
> - int srclen_save = srclen;
> -
> - key_len[0] = key_len[1] = key_len[2] = key_len[3] = 0;
> - for (; srclen; srclen--, src++)
> - {
> - unsigned int i, decomposed_len = 1;/*wine_decompose(*src, dummy, 4);*/
> - dummy[0] = *src;
> - if (decomposed_len)
> - {
> - for (i = 0; i < decomposed_len; i++)
> - {
> - WCHAR wch = dummy[i];
> - unsigned int ce;
> -
> - if ((flags & NORM_IGNORESYMBOLS) &&
> - (get_char_type( CT_CTYPE1, wch ) & (C1_PUNCT | C1_SPACE)))
> - continue;
> -
> - if (flags & NORM_IGNORECASE) wch = casemap( nls_info.LowerCaseTable, wch );
> -
> - ce = collation_table[collation_table[collation_table[wch >> 8] + ((wch >> 4) & 0x0f)] + (wch & 0xf)];
> - if (ce != (unsigned int)-1)
> - {
> - if (ce >> 16) key_len[0] += 2;
> - if ((ce >> 8) & 0xff) key_len[1]++;
> - if ((ce >> 4) & 0x0f) key_len[2]++;
> - if (ce & 1)
> - {
> - if (wch >> 8) key_len[3]++;
> - key_len[3]++;
> - }
> - }
> - else
> - {
> - key_len[0] += 2;
> - if (wch >> 8) key_len[0]++;
> - if (wch & 0xff) key_len[0]++;
> - }
> - }
> - }
> - }
> -
> - if (!dstlen) /* compute length */
> - /* 4 * '\1' + key length */
> - return key_len[0] + key_len[1] + key_len[2] + key_len[3] + 4;
> -
> - if (dstlen < key_len[0] + key_len[1] + key_len[2] + key_len[3] + 4 + 1)
> - return 0; /* overflow */
> -
> - src = src_save;
> - srclen = srclen_save;
> -
> - key_ptr[0] = dst;
> - key_ptr[1] = key_ptr[0] + key_len[0] + 1;
> - key_ptr[2] = key_ptr[1] + key_len[1] + 1;
> - key_ptr[3] = key_ptr[2] + key_len[2] + 1;
> -
> - for (; srclen; srclen--, src++)
> - {
> - unsigned int i, decomposed_len = 1;/*wine_decompose(*src, dummy, 4);*/
> - dummy[0] = *src;
> - if (decomposed_len)
> - {
> - for (i = 0; i < decomposed_len; i++)
> - {
> - WCHAR wch = dummy[i];
> - unsigned int ce;
> -
> - if ((flags & NORM_IGNORESYMBOLS) &&
> - (get_char_type( CT_CTYPE1, wch ) & (C1_PUNCT | C1_SPACE)))
> - continue;
> -
> - if (flags & NORM_IGNORECASE) wch = casemap( nls_info.LowerCaseTable, wch );
> -
> - ce = collation_table[collation_table[collation_table[wch >> 8] + ((wch >> 4) & 0x0f)] + (wch & 0xf)];
> - if (ce != (unsigned int)-1)
> - {
> - WCHAR key;
> - if ((key = ce >> 16))
> - {
> - *key_ptr[0]++ = key >> 8;
> - *key_ptr[0]++ = key & 0xff;
> - }
> - /* make key 1 start from 2 */
> - if ((key = (ce >> 8) & 0xff)) *key_ptr[1]++ = key + 1;
> - /* make key 2 start from 2 */
> - if ((key = (ce >> 4) & 0x0f)) *key_ptr[2]++ = key + 1;
> - /* key 3 is always a character code */
> - if (ce & 1)
> - {
> - if (wch >> 8) *key_ptr[3]++ = wch >> 8;
> - if (wch & 0xff) *key_ptr[3]++ = wch & 0xff;
> - }
> - }
> - else
> - {
> - *key_ptr[0]++ = 0xff;
> - *key_ptr[0]++ = 0xfe;
> - if (wch >> 8) *key_ptr[0]++ = wch >> 8;
> - if (wch & 0xff) *key_ptr[0]++ = wch & 0xff;
> - }
> - }
> - }
> - }
> -
> - *key_ptr[0] = 1;
> - *key_ptr[1] = 1;
> - *key_ptr[2] = 1;
> - *key_ptr[3]++ = 1;
> - *key_ptr[3] = 0;
> - return key_ptr[3] - dst;
> -}
> -
> -
> /* compose a full-width katakana. return consumed source characters. */
> static int compose_katakana( const WCHAR *src, int srclen, WCHAR *dst )
> {
> @@ -2574,6 +2453,358 @@ static int compare_weights(int flags, const WCHAR *str1, int len1,
> return len1 - len2;
> }
>
> +/* Start sortkey handler code. */
> +
> +/* Defines */
> +
> +#define JAPANESE 3
> +#define MIN_WEIGHT 2
> +#define LIST_STACK_BUFFER 1000
> +
> +/* Internal structures */
Are these comments useful?
> +
> +typedef struct _character_info
> +{
> + BYTE weight_primary;
> + BYTE script_member;
> + BYTE weight_diacritic;
> + BYTE weight_case;
> +} character_info;
> +
I get the impression that typedefs have largely fallen out of favour.
> +typedef struct _weight_main_info
> +{
> + BYTE script_member;
> + BYTE weight_primary;
> + BYTE extra;
> +} weight_main_info;
> +
> +typedef struct _list
> +{
> + int extra_len;
> + int len;
> + BYTE buffer[LIST_STACK_BUFFER];
> + int buffer_count;
> + BYTE* extra;
> + int element_size;
> +} list;
> +
> +typedef struct _sortkey_data
> +{
> + int flags;
> + list key;
> + list weights_main;
> + list weights_diacritic;
> + list weights_case;
> +} sortkey_data;
> +
> +/* List functions */
> +
> +static void LIST_INIT(list* name, int type_size)
> +{
> + name->extra_len = 0;
> + name->len = 0;
> + name->extra = 0;
> + name->buffer_count = LIST_STACK_BUFFER / type_size;
> + name->element_size = type_size;
> +}
> +
> +static void LIST_DESTROY(list* name)
> +{
> + RtlFreeHeap(GetProcessHeap(), 0, name->extra);
> +}
> +
> +static void* LIST_GET(list* name, int index)
> +{
> + if ((index + 1) * name->element_size <= LIST_STACK_BUFFER)
> + return &name->buffer[index * name->element_size];
> + else
> + return &name->extra[index * name->element_size - name->buffer_count];
> +}
> +
> +/* Add entry to list, resizing as needed */
> +static void LIST_ADD(list* name, const void *value)
> +{
> + void* entry;
> + if ((name->len + 1) * name->element_size > name->extra_len + LIST_STACK_BUFFER)
> + {
> + if (!name->extra) /* First allocation */
> + {
> + name->extra_len = LIST_STACK_BUFFER;
> + name->extra = RtlAllocateHeap(GetProcessHeap(), 0, name->extra_len);
> + }
> + else
> + {
> + name->extra_len *= 2;
> + name->extra = RtlReAllocateHeap(GetProcessHeap(), 0,name->extra, name->extra_len);
> + }
> + }
> + entry = LIST_GET(name, name->len);
> + memcpy(entry, value, name->element_size);
> + name->len++;
> +}
> +
> +/* Append a weight list to the sortkey */
> +#define APPEND_LIST_TO_SORTKEY(data, weights, type, statement_get_value, statement_is_ignored) \
> + do { \
> + int z; \
> + int end = data->weights.len - 1; \
> + while (end >= 0) \
> + { \
> + const type* element = LIST_GET(&data->weights, end); \
> + (void)element; \
> + if (!(statement_is_ignored)) break; \
> + end--; \
> + } \
> + for (z = 0; z <= end; z++) \
> + { \
> + const type* element = LIST_GET(&data->weights, z); \
> + LIST_ADD(&data->key, statement_get_value); \
> + } \
> + } while (0);
> +
> +/* Helper functions */
> +
> +static BOOL get_char(sortkey_data* data, character_info* info, WCHAR ch)
> +{
> + DWORD value = sort.keys[ch];
> +
> + info->weight_case = value >> 24;
> + info->weight_diacritic = (value >> 16) & 0xff;
> + info->script_member = (value >> 8) & 0xff;
> + info->weight_primary = value & 0xff;
> + return info->script_member != 0;
> +}
> +
> +static void sortkey_data_init(sortkey_data* data, int flags, const WCHAR* locale, BOOL is_compare_string)
> +{
> + data->flags = flags;
> + LIST_INIT(&data->key, sizeof(BYTE));
> + LIST_INIT(&data->weights_main, sizeof(BYTE));
> + LIST_INIT(&data->weights_diacritic, sizeof(BYTE));
> + LIST_INIT(&data->weights_case, sizeof(BYTE));
> +}
> +
> +static void sortkey_data_destroy(sortkey_data* data)
> +{
> + LIST_DESTROY(&data->key);
> + LIST_DESTROY(&data->weights_main);
> + LIST_DESTROY(&data->weights_diacritic);
> + LIST_DESTROY(&data->weights_case);
> +}
> +
> +static weight_main_info create_weight_main(BYTE script_member, BYTE weight_primary)
> +{
> + weight_main_info ret = { 0 };
> + ret.script_member = script_member;
> + ret.weight_primary = weight_primary;
> + return ret;
> +}
> +
> +static void case_weights_add(sortkey_data* data, BYTE value)
> +{
> + int flags = data->flags;
> + if (NORM_IGNORECASE & flags)
> + value = value & ~(16 + 8);
> + if (NORM_IGNOREWIDTH & flags)
> + value = value & ~(1);
> + if (NORM_IGNOREKANATYPE & flags)
> + value = value & ~(32);
> +
> + LIST_ADD(&data->weights_case, &value);
> +}
> +
> +static void main_weights_add(sortkey_data *data, weight_main_info* value)
> +{
> + LIST_ADD(&data->weights_main, &value->script_member);
> + LIST_ADD(&data->weights_main, &value->weight_primary);
> + if (value->extra > 0)
> + LIST_ADD(&data->weights_main, &value->extra);
> +}
> +
> +static void diacritic_weights_add(sortkey_data* data, const character_info* info, BYTE value)
> +{
> + LIST_ADD(&data->weights_diacritic, &value);
> +}
> +
> +/* Main sortkey logic */
> +
> +static void sortkey_handle_default_character(sortkey_data* data, WCHAR c)
> +{
> + weight_main_info weightmain;
> + character_info info;
> +
> + if (!get_char(data, &info, c))
> + {
> + return;
> + }
> +
> + weightmain = create_weight_main(info.script_member, info.weight_primary);
> + if (info.script_member >= 0xa9 && info.script_member <= 0xaf) /* Some CJK have extra value */
> + weightmain.extra = info.weight_diacritic;
> + else
> + diacritic_weights_add(data, &info, info.weight_diacritic);
> +
> + main_weights_add(data, &weightmain);
> +
> + case_weights_add(data, info.weight_case);
> +}
> +
> +static BOOL sortkey_handle_character(sortkey_data* data, WCHAR c, const WCHAR* str, int i)
> +{
> + weight_main_info weightmain;
> + character_info info;
> + int flags = data->flags;
> +
> + if (!get_char(data, &info, c))
> + {
> + return FALSE;
> + }
> +
> + switch (info.script_member)
> + {
> + case 0: /* Not sorted */
> + break;
> +
> + case 1:
> + if (data->weights_diacritic.len > 0)
> + {
> + BYTE* entry = LIST_GET(&data->weights_diacritic, data->weights_diacritic.len - 1);
> + *entry += info.weight_diacritic; /* Overflow can happen, that's okay */
> + }
> + else
> + diacritic_weights_add(data, &info, info.weight_diacritic);
> + break;
> +
> + case JAPANESE:
> + /* TODO */
> + break;
> +
> + case 4: /* Jamo */
> + weightmain = create_weight_main(info.weight_primary, info.weight_diacritic);
> + main_weights_add(data, &weightmain);
> +
> + diacritic_weights_add(data, &info, MIN_WEIGHT);
> +
> + case_weights_add(data, info.weight_case);
> + break;
> +
> + case 5:
> + weightmain = create_weight_main(253, 255);
> + main_weights_add(data, &weightmain);
> +
> + weightmain = create_weight_main(info.weight_primary, info.weight_diacritic);
> + main_weights_add(data, &weightmain);
> +
> + diacritic_weights_add(data, &info, MIN_WEIGHT);
> +
> + case_weights_add(data, MIN_WEIGHT);
> + break;
> +
> + case 6: /* Punctuation */
> + /* TODO */
> + break;
> +
> + case 7: /* Symbols */
> + case 8: /* Symbols */
> + case 9: /* Symbols */
> + case 10: /* Symbols */
> + case 11: /* Symbols */
> + case 12: /* Symbols */
> + if (flags & NORM_IGNORESYMBOLS)
> + break;
> +
> + weightmain = create_weight_main(info.script_member, info.weight_primary);
> + main_weights_add(data, &weightmain);
> +
> + diacritic_weights_add(data, &info, info.weight_diacritic);
> +
> + case_weights_add(data, info.weight_case);
> + break;
> +
> + default:
> + sortkey_handle_default_character(data, c);
> + break;
The fact that exactly one of these integer cases has a symbolic constant
attached seems less than ideal.
> + }
> + return TRUE;
> +}
> +
> +static void sortkey_write_result(sortkey_data* data)
> +{
> + int flags = data->flags;
> +
> + const BYTE SORTKEY_SEPARATOR = 1;
> + const BYTE SORTKEY_TERMINATOR = 0;
> +
> + /* Main weights */
> +
> + APPEND_LIST_TO_SORTKEY(data, weights_main, BYTE, element, FALSE);
> +
> + LIST_ADD(&data->key, &SORTKEY_SEPARATOR);
> +
> + /* Diacritic weights */
> +
> + if ((flags & NORM_IGNORENONSPACE) == 0)
> + {
> + APPEND_LIST_TO_SORTKEY(data, weights_diacritic, BYTE, element, *element <= MIN_WEIGHT);
> + }
> +
> + LIST_ADD(&data->key, &SORTKEY_SEPARATOR);
> +
> + /* Case weights */
> + if ((NORM_IGNORECASE & flags) == 0 || (NORM_IGNOREWIDTH & flags) == 0)
> + {
> + APPEND_LIST_TO_SORTKEY(data, weights_case, BYTE, element, FALSE);
> + }
> +
> + LIST_ADD(&data->key, &SORTKEY_SEPARATOR);
> +
> + /* Extra weights */
> + /* TODO */
> +
> + LIST_ADD(&data->key, &SORTKEY_SEPARATOR);
> +
> + /* Special weights */
> + /* TODO */
> +
> + LIST_ADD(&data->key, &SORTKEY_TERMINATOR);
> +}
> +
> +static int sortkey_generate(int flags, const WCHAR* locale, const WCHAR* str, int str_len, BYTE* buffer, int buffer_len)
> +{
> + int i;
> + sortkey_data data;
> + int ret = 0;
> +
> + sortkey_data_init(&data, flags, locale, FALSE);
> +
> + if (str_len == -1)
> + str_len = wcslen(str);
> +
> + for (i = 0; i < str_len; i++)
> + {
> + sortkey_handle_character(&data, str[i], str, i);
> + }
> +
> + sortkey_write_result(&data);
> +
> + if (data.key.len <= buffer_len)
> + {
> + for (i = 0; i < data.key.len; i++)
> + {
> + BYTE* value = LIST_GET(&data.key, i);
> + buffer[i] = *value;
> + }
> + ret = data.key.len;
> + }
> + else if (!buffer)
> + {
> + ret = data.key.len;
> + }
> + sortkey_data_destroy(&data);
> + return ret;
> +}
> +
> +/* End sortkey handler code */
>
> static const struct geoinfo *get_geoinfo_ptr( GEOID geoid )
> {
> @@ -4964,8 +5195,8 @@ INT WINAPI DECLSPEC_HOTPATCH LCMapStringEx( const WCHAR *locale, DWORD flags, co
> TRACE( "(%s,0x%08x,%s,%d,%p,%d)\n",
> debugstr_w(locale), flags, debugstr_wn(src, srclen), srclen, dst, dstlen );
>
> - if ((ret = get_sortkey( flags, src, srclen, (char *)dst, dstlen ))) ret++;
> - else SetLastError( ERROR_INSUFFICIENT_BUFFER );
> + if (!(ret = sortkey_generate(flags, L"", src, srclen, (BYTE *)dst, dstlen )))
> + SetLastError( ERROR_INSUFFICIENT_BUFFER );
> return ret;
> }
>
> --
> 2.26.2
>
>
April 30, 2020
Re: [PATCH] include: Add dvdif.idl.
by Marvin
Hi,
While running your changed tests, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=70879
Your paranoid android.
=== debiant (build log) ===
../../include/strmif.h:13939:30: error: conflicting types for ‘title’
../../include/strmif.h:13939:30: error: conflicting types for ‘title’
../../include/strmif.h:14180:131: error: conflicting types for ‘title’
../../include/strmif.h:13939:30: error: conflicting types for ‘title’
../../include/strmif.h:13939:30: error: conflicting types for ‘title’
../../include/strmif.h:13939:30: error: conflicting types for ‘title’
../../include/strmif.h:13939:30: error: conflicting types for ‘title’
Task: The win32 Wine build failed
=== debiant (build log) ===
../../include/strmif.h:13939:30: error: conflicting types for ‘title’
../../include/strmif.h:13939:30: error: conflicting types for ‘title’
../../include/strmif.h:14180:131: error: conflicting types for ‘title’
../../include/strmif.h:13939:30: error: conflicting types for ‘title’
../../include/strmif.h:13939:30: error: conflicting types for ‘title’
../../include/strmif.h:13939:30: error: conflicting types for ‘title’
../../include/strmif.h:14180:131: error: conflicting types for ‘title’
Task: The wow64 Wine build failed
April 29, 2020
[PATCH] xaudio2: Avoid redefining several F3DAudio related constants.
by Gerald Pfeifer
I noticed a bunch of compiler warnings like the following issued
by GCC 10:
In file included from ../xaudio2_7/x3daudio.c:29:
.../include/F3DAudio.h:69: warning: "SPEAKER_2POINT1" redefined
../../include/x3daudio.h:127: note: this is the location of the previous definition
Our own include/x3daudio.h tries to prevent that via
#ifndef _SPEAKER_POSITIONS_
#define _SPEAKER_POSITIONS_
However, current it is included *before* the system provided F3DAudio.h,
so this safety net falls short.
Fixed thusly by changing the order of these two include files so that the
system provided one comes first.
Gerald
Signed-off-by: Gerald Pfeifer <gerald(a)pfeifer.com>
---
dlls/xaudio2_7/x3daudio.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/dlls/xaudio2_7/x3daudio.c b/dlls/xaudio2_7/x3daudio.c
index 240cd5c101..6f16ba3470 100644
--- a/dlls/xaudio2_7/x3daudio.c
+++ b/dlls/xaudio2_7/x3daudio.c
@@ -20,15 +20,13 @@
#include "config.h"
#include <stdarg.h>
-
+#include <F3DAudio.h>
#include "windef.h"
#include "winbase.h"
#include "x3daudio.h"
#include "wine/debug.h"
-#include <F3DAudio.h>
-
#if XAUDIO2_VER >= 8 || defined X3DAUDIO1_VER
WINE_DEFAULT_DEBUG_CHANNEL(xaudio2);
#endif
--
2.25.0
April 29, 2020
[PATCH] include: Add dvdif.idl.
by Zebediah Figura
From: Vijay Kiran Kamuju <infyquest(a)gmail.com>
Signed-off-by: Vijay Kiran Kamuju <infyquest(a)gmail.com>
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
include/Makefile.in | 1 +
include/dvdif.idl | 742 ++++++++++++++++++++++++++++++++++++++++++++
include/strmif.idl | 6 +-
3 files changed, 744 insertions(+), 5 deletions(-)
create mode 100644 include/dvdif.idl
diff --git a/include/Makefile.in b/include/Makefile.in
index 543d41811c..74db5ee151 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -238,6 +238,7 @@ SOURCES = \
dshow.h \
dsound.h \
dsrole.h \
+ dvdif.idl \
dvdmedia.h \
dvoice.h \
dwmapi.h \
diff --git a/include/dvdif.idl b/include/dvdif.idl
new file mode 100644
index 0000000000..d37815d1db
--- /dev/null
+++ b/include/dvdif.idl
@@ -0,0 +1,742 @@
+/*
+ * Copyright (C) 2020 Vijay Kiran Kamuju
+ *
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#if 0
+pragma makedep install
+#endif
+
+import "unknwn.idl";
+import "objidl.idl";
+
+cpp_quote("#include <ddraw.h>")
+
+cpp_quote("#if 0")
+interface IGraphBuilder;
+cpp_quote("#endif")
+
+typedef enum tagDVD_DOMAIN
+{
+ DVD_DOMAIN_FirstPlay = 1,
+ DVD_DOMAIN_VideoManagerMenu,
+ DVD_DOMAIN_VideoTitleSetMenu,
+ DVD_DOMAIN_Title,
+ DVD_DOMAIN_Stop
+} DVD_DOMAIN;
+
+typedef enum tagDVD_MENU_ID
+{
+ DVD_MENU_Title = 2,
+ DVD_MENU_Root = 3,
+ DVD_MENU_Subpicture = 4,
+ DVD_MENU_Audio = 5,
+ DVD_MENU_Angle = 6,
+ DVD_MENU_Chapter = 7
+} DVD_MENU_ID;
+
+typedef enum tagDVD_DISC_SIDE
+{
+ DVD_SIDE_A = 1,
+ DVD_SIDE_B = 2
+} DVD_DISC_SIDE;
+
+typedef enum tagDVD_PREFERRED_DISPLAY_MODE
+{
+ DISPLAY_CONTENT_DEFAULT = 0,
+ DISPLAY_16x9 = 1,
+ DISPLAY_4x3_PANSCAN_PREFERRED = 2,
+ DISPLAY_4x3_LETTERBOX_PREFERRED = 3
+} DVD_PREFERRED_DISPLAY_MODE;
+
+typedef WORD DVD_REGISTER;
+typedef DVD_REGISTER GPRMARRAY[16];
+typedef DVD_REGISTER SPRMARRAY[24];
+
+typedef struct tagDVD_ATR
+{
+ ULONG ulCAT;
+ BYTE pbATRI[768];
+} DVD_ATR;
+
+typedef BYTE DVD_VideoATR[2];
+typedef BYTE DVD_AudioATR[8];
+typedef BYTE DVD_SubpictureATR[6];
+
+typedef enum tagDVD_FRAMERATE
+{
+ DVD_FPS_25 = 1,
+ DVD_FPS_30NonDrop = 3
+} DVD_FRAMERATE;
+
+cpp_quote("typedef struct tagDVD_TIMECODE")
+cpp_quote("{")
+cpp_quote(" ULONG Hours1 : 4;")
+cpp_quote(" ULONG Hours10 : 4;")
+cpp_quote(" ULONG Minutes1 : 4;")
+cpp_quote(" ULONG Minutes10 : 4;")
+cpp_quote(" ULONG Seconds1 : 4;")
+cpp_quote(" ULONG Seconds10 : 4;")
+cpp_quote(" ULONG Frames1 : 4;")
+cpp_quote(" ULONG Frames10 : 2;")
+cpp_quote(" ULONG FrameRateCode : 2;")
+cpp_quote("} DVD_TIMECODE;")
+
+typedef enum tagDVD_NavCmdType
+{
+ DVD_NavCmdType_Pre = 1,
+ DVD_NavCmdType_Post = 2,
+ DVD_NavCmdType_Cell = 3,
+ DVD_NavCmdType_Button = 4
+} DVD_NavCmdType;
+
+typedef enum tagDVD_TIMECODE_FLAGS
+{
+ DVD_TC_FLAG_25fps = 0x00000001,
+ DVD_TC_FLAG_30fps = 0x00000002,
+ DVD_TC_FLAG_DropFrame = 0x00000004,
+ DVD_TC_FLAG_Interpolated = 0x00000008
+} DVD_TIMECODE_FLAGS;
+
+typedef struct tagDVD_HMSF_TIMECODE
+{
+ BYTE bHours;
+ BYTE bMinutes;
+ BYTE bSeconds;
+ BYTE bFrames;
+} DVD_HMSF_TIMECODE;
+
+typedef struct tagDVD_PLAYBACK_LOCATION2
+{
+ ULONG TitleNum;
+ ULONG ChapterNum;
+ DVD_HMSF_TIMECODE TimeCode;
+ ULONG TimeCodeFlags;
+} DVD_PLAYBACK_LOCATION2;
+
+typedef struct tagDVD_PLAYBACK_LOCATION
+{
+ ULONG TitleNum;
+ ULONG ChapterNum;
+ ULONG TimeCode;
+} DVD_PLAYBACK_LOCATION;
+
+typedef DWORD VALID_UOP_SOMTHING_OR_OTHER;
+
+typedef enum
+{
+ UOP_FLAG_Play_Title_Or_AtTime = 0x00000001,
+ UOP_FLAG_Play_Chapter = 0x00000002,
+ UOP_FLAG_Play_Title = 0x00000004,
+ UOP_FLAG_Stop = 0x00000008,
+ UOP_FLAG_ReturnFromSubMenu = 0x00000010,
+ UOP_FLAG_Play_Chapter_Or_AtTime = 0x00000020,
+ UOP_FLAG_PlayPrev_Or_Replay_Chapter = 0x00000040,
+ UOP_FLAG_PlayNext_Chapter = 0x00000080,
+ UOP_FLAG_Play_Forwards = 0x00000100,
+ UOP_FLAG_Play_Backwards = 0x00000200,
+ UOP_FLAG_ShowMenu_Title = 0x00000400,
+ UOP_FLAG_ShowMenu_Root = 0x00000800,
+ UOP_FLAG_ShowMenu_SubPic = 0x00001000,
+ UOP_FLAG_ShowMenu_Audio = 0x00002000,
+ UOP_FLAG_ShowMenu_Angle = 0x00004000,
+ UOP_FLAG_ShowMenu_Chapter = 0x00008000,
+ UOP_FLAG_Resume = 0x00010000,
+ UOP_FLAG_Select_Or_Activate_Button = 0x00020000,
+ UOP_FLAG_Still_Off = 0x00040000,
+ UOP_FLAG_Pause_On = 0x00080000,
+ UOP_FLAG_Select_Audio_Stream = 0x00100000,
+ UOP_FLAG_Select_SubPic_Stream = 0x00200000,
+ UOP_FLAG_Select_Angle = 0x00400000,
+ UOP_FLAG_Select_Karaoke_Audio_Presentation_Mode = 0x00800000,
+ UOP_FLAG_Select_Video_Mode_Preference = 0x01000000
+} VALID_UOP_FLAG;
+
+typedef enum
+{
+ DVD_CMD_FLAG_None = 0x00000000,
+ DVD_CMD_FLAG_Flush = 0x00000001,
+ DVD_CMD_FLAG_SendEvents = 0x00000002,
+ DVD_CMD_FLAG_Block = 0x00000004,
+ DVD_CMD_FLAG_StartWhenRendered = 0x00000008,
+ DVD_CMD_FLAG_EndAfterRendered = 0x00000010
+} DVD_CMD_FLAGS;
+
+typedef enum
+{
+ DVD_ResetOnStop = 1,
+ DVD_NotifyParentalLevelChange = 2,
+ DVD_HMSF_TimeCodeEvents = 3,
+ DVD_AudioDuringFFwdRew = 4,
+ DVD_EnableNonblockingAPIs = 5,
+ DVD_CacheSizeInMB = 6,
+ DVD_EnablePortableBookmarks = 7,
+ DVD_EnableExtendedCopyProtectErrors = 8,
+ DVD_NotifyPositionChange = 9,
+ DVD_IncreaseOutputControl = 10,
+ DVD_EnableStreaming = 11,
+ DVD_EnableESOutput = 12,
+ DVD_EnableTitleLength = 13,
+ DVD_DisableStillThrottle = 14,
+ DVD_EnableLoggingEvents = 15,
+ DVD_MaxReadBurstInKB = 16,
+ DVD_ReadBurstPeriodInMS = 17,
+ DVD_RestartDisc = 18,
+ DVD_EnableCC = 19
+} DVD_OPTION_FLAG;
+
+typedef enum
+{
+ DVD_Relative_Upper = 1,
+ DVD_Relative_Lower = 2,
+ DVD_Relative_Left = 3,
+ DVD_Relative_Right = 4
+} DVD_RELATIVE_BUTTON;
+
+typedef enum tagDVD_PARENTAL_LEVEL
+{
+ DVD_PARENTAL_LEVEL_8 = 0x8000,
+ DVD_PARENTAL_LEVEL_7 = 0x4000,
+ DVD_PARENTAL_LEVEL_6 = 0x2000,
+ DVD_PARENTAL_LEVEL_5 = 0x1000,
+ DVD_PARENTAL_LEVEL_4 = 0x0800,
+ DVD_PARENTAL_LEVEL_3 = 0x0400,
+ DVD_PARENTAL_LEVEL_2 = 0x0200,
+ DVD_PARENTAL_LEVEL_1 = 0x0100
+} DVD_PARENTAL_LEVEL;
+
+typedef enum tagDVD_AUDIO_LANG_EXT
+{
+ DVD_AUD_EXT_NotSpecified = 0,
+ DVD_AUD_EXT_Captions = 1,
+ DVD_AUD_EXT_VisuallyImpaired = 2,
+ DVD_AUD_EXT_DirectorComments1 = 3,
+ DVD_AUD_EXT_DirectorComments2 = 4
+} DVD_AUDIO_LANG_EXT;
+
+typedef enum tagDVD_SUBPICTURE_LANG_EXT
+{
+ DVD_SP_EXT_NotSpecified = 0,
+ DVD_SP_EXT_Caption_Normal = 1,
+ DVD_SP_EXT_Caption_Big = 2,
+ DVD_SP_EXT_Caption_Children = 3,
+ DVD_SP_EXT_CC_Normal = 5,
+ DVD_SP_EXT_CC_Big = 6,
+ DVD_SP_EXT_CC_Children = 7,
+ DVD_SP_EXT_Forced = 9,
+ DVD_SP_EXT_DirectorComments_Normal = 13,
+ DVD_SP_EXT_DirectorComments_Big = 14,
+ DVD_SP_EXT_DirectorComments_Children = 15
+} DVD_SUBPICTURE_LANG_EXT;
+
+typedef enum tagDVD_AUDIO_APPMODE
+{
+ DVD_AudioMode_None = 0,
+ DVD_AudioMode_Karaoke = 1,
+ DVD_AudioMode_Surround = 2,
+ DVD_AudioMode_Other = 3
+} DVD_AUDIO_APPMODE;
+
+typedef enum tagDVD_AUDIO_FORMAT
+{
+ DVD_AudioFormat_AC3 = 0,
+ DVD_AudioFormat_MPEG1 = 1,
+ DVD_AudioFormat_MPEG1_DRC = 2,
+ DVD_AudioFormat_MPEG2 = 3,
+ DVD_AudioFormat_MPEG2_DRC = 4,
+ DVD_AudioFormat_LPCM = 5,
+ DVD_AudioFormat_DTS = 6,
+ DVD_AudioFormat_SDDS = 7,
+ DVD_AudioFormat_Other = 8
+} DVD_AUDIO_FORMAT;
+
+typedef enum tagDVD_KARAOKE_DOWNMIX
+{
+ DVD_Mix_0to0 = 0x0001,
+ DVD_Mix_1to0 = 0x0002,
+ DVD_Mix_2to0 = 0x0004,
+ DVD_Mix_3to0 = 0x0008,
+ DVD_Mix_4to0 = 0x0010,
+ DVD_Mix_Lto0 = 0x0020,
+ DVD_Mix_Rto0 = 0x0040,
+ DVD_Mix_0to1 = 0x0100,
+ DVD_Mix_1to1 = 0x0200,
+ DVD_Mix_2to1 = 0x0400,
+ DVD_Mix_3to1 = 0x0800,
+ DVD_Mix_4to1 = 0x1000,
+ DVD_Mix_Lto1 = 0x2000,
+ DVD_Mix_Rto1 = 0x4000
+} DVD_KARAOKE_DOWNMIX;
+
+typedef enum tagDVD_KARAOKE_CONTENTS
+{
+ DVD_Karaoke_GuideVocal1 = 0x0001,
+ DVD_Karaoke_GuideVocal2 = 0x0002,
+ DVD_Karaoke_GuideMelody1 = 0x0004,
+ DVD_Karaoke_GuideMelody2 = 0x0008,
+ DVD_Karaoke_GuideMelodyA = 0x0010,
+ DVD_Karaoke_GuideMelodyB = 0x0020,
+ DVD_Karaoke_SoundEffectA = 0x0040,
+ DVD_Karaoke_SoundEffectB = 0x0080
+} DVD_KARAOKE_CONTENTS;
+
+typedef enum tagDVD_KARAOKE_ASSIGNMENT
+{
+ DVD_Assignment_reserved0 = 0,
+ DVD_Assignment_reserved1 = 1,
+ DVD_Assignment_LR = 2,
+ DVD_Assignment_LRM = 3,
+ DVD_Assignment_LR1 = 4,
+ DVD_Assignment_LRM1 = 5,
+ DVD_Assignment_LR12 = 6,
+ DVD_Assignment_LRM12 = 7
+} DVD_KARAOKE_ASSIGNMENT;
+
+typedef struct tagDVD_MUA_MixingInfo
+{
+ BOOL fMixTo0;
+ BOOL fMixTo1;
+ BOOL fMix0InPhase;
+ BOOL fMix1InPhase;
+ DWORD dwSpeakerPosition;
+} DVD_MUA_MixingInfo;
+
+typedef struct tagDVD_MUA_Coeff
+{
+ double log2_alpha;
+ double log2_beta;
+} DVD_MUA_Coeff;
+
+typedef enum tagDVD_VIDEO_COMPRESSION
+{
+ DVD_VideoCompression_Other = 0,
+ DVD_VideoCompression_MPEG1 = 1,
+ DVD_VideoCompression_MPEG2 = 2
+} DVD_VIDEO_COMPRESSION;
+
+typedef enum tagDVD_SUBPICTURE_TYPE
+{
+ DVD_SPType_NotSpecified = 0,
+ DVD_SPType_Language = 1,
+ DVD_SPType_Other = 2
+} DVD_SUBPICTURE_TYPE;
+
+typedef enum tagDVD_SUBPICTURE_CODING
+{
+ DVD_SPCoding_RunLength = 0,
+ DVD_SPCoding_Extended = 1,
+ DVD_SPCoding_Other = 2
+} DVD_SUBPICTURE_CODING;
+
+typedef enum tagDVD_TITLE_APPMODE
+{
+ DVD_AppMode_Not_Specified = 0,
+ DVD_AppMode_Karaoke = 1,
+ DVD_AppMode_Other = 3
+} DVD_TITLE_APPMODE;
+
+enum DVD_TextStringType
+{
+ DVD_Struct_Volume = 0x01,
+ DVD_Struct_Title = 0x02,
+ DVD_Struct_ParentalID = 0x03,
+ DVD_Struct_PartOfTitle = 0x04,
+ DVD_Struct_Cell = 0x05,
+ DVD_Stream_Audio = 0x10,
+ DVD_Stream_Subpicture = 0x11,
+ DVD_Stream_Angle = 0x12,
+ DVD_Channel_Audio = 0x20,
+ DVD_General_Name = 0x30,
+ DVD_General_Comments = 0x31,
+ DVD_Title_Series = 0x38,
+ DVD_Title_Movie = 0x39,
+ DVD_Title_Video = 0x3a,
+ DVD_Title_Album = 0x3b,
+ DVD_Title_Song = 0x3c,
+ DVD_Title_Other = 0x3f,
+ DVD_Title_Sub_Series = 0x40,
+ DVD_Title_Sub_Movie = 0x41,
+ DVD_Title_Sub_Video = 0x42,
+ DVD_Title_Sub_Album = 0x43,
+ DVD_Title_Sub_Song = 0x44,
+ DVD_Title_Sub_Other = 0x47,
+ DVD_Title_Orig_Series = 0x48,
+ DVD_Title_Orig_Movie = 0x49,
+ DVD_Title_Orig_Video = 0x4a,
+ DVD_Title_Orig_Album = 0x4b,
+ DVD_Title_Orig_Song = 0x4c,
+ DVD_Title_Orig_Other = 0x4f,
+ DVD_Other_Scene = 0x50,
+ DVD_Other_Cut = 0x51,
+ DVD_Other_Take = 0x52
+};
+
+enum DVD_TextCharSet
+{
+ DVD_CharSet_Unicode = 0,
+ DVD_CharSet_ISO646 = 1,
+ DVD_CharSet_JIS_Roman_Kanji = 2,
+ DVD_CharSet_ISO8859_1 = 3,
+ DVD_CharSet_ShiftJIS_Kanji_Roman_Katakana = 4
+};
+
+typedef struct tagDVD_AudioAttributes
+{
+ DVD_AUDIO_APPMODE AppMode;
+ BYTE AppModeData;
+ DVD_AUDIO_FORMAT AudioFormat;
+ LCID Language;
+ DVD_AUDIO_LANG_EXT LanguageExtension;
+ BOOL fHasMultichannelInfo;
+ DWORD dwFrequency;
+ BYTE bQuantization;
+ BYTE bNumberOfChannels;
+ DWORD dwReserved[2];
+} DVD_AudioAttributes;
+
+typedef struct tagDVD_MultichannelAudioAttributes
+{
+ DVD_MUA_MixingInfo Info[8];
+ DVD_MUA_Coeff Coeff[8];
+} DVD_MultichannelAudioAttributes;
+
+typedef struct tagDVD_VideoAttributes
+{
+ BOOL fPanscanPermitted;
+ BOOL fLetterboxPermitted;
+ ULONG ulAspectX;
+ ULONG ulAspectY;
+ ULONG ulFrameRate;
+ ULONG ulFrameHeight;
+ DVD_VIDEO_COMPRESSION Compression;
+ BOOL fLine21Field1InGOP;
+ BOOL fLine21Field2InGOP;
+ ULONG ulSourceResolutionX;
+ ULONG ulSourceResolutionY;
+ BOOL fIsSourceLetterboxed;
+ BOOL fIsFilmMode;
+} DVD_VideoAttributes;
+
+typedef struct tagDVD_SubpictureAttributes
+{
+ DVD_SUBPICTURE_TYPE Type;
+ DVD_SUBPICTURE_CODING CodingMode;
+ LCID Language;
+ DVD_SUBPICTURE_LANG_EXT LanguageExtension;
+} DVD_SubpictureAttributes;
+
+typedef struct tagDVD_KaraokeAttributes
+{
+ BYTE bVersion;
+ BOOL fMasterOfCeremoniesInGuideVocal1;
+ BOOL fDuet;
+ DVD_KARAOKE_ASSIGNMENT ChannelAssignment;
+ WORD wChannelContents[8];
+} DVD_KaraokeAttributes;
+
+typedef struct tagDVD_TitleMainAttributes
+{
+ union
+ {
+ DVD_TITLE_APPMODE AppMode;
+ DVD_HMSF_TIMECODE TitleLength;
+ } DUMMYUNIONNAME;
+ DVD_VideoAttributes VideoAttributes;
+ ULONG ulNumberOfAudioStreams;
+ DVD_AudioAttributes AudioAttributes[8];
+ DVD_MultichannelAudioAttributes MultichannelAudioAttributes[8];
+ ULONG ulNumberOfSubpictureStreams;
+ DVD_SubpictureAttributes SubpictureAttributes[32];
+} DVD_TitleAttributes;
+
+typedef struct tagDVD_MenuAttributes
+{
+ BOOL fCompatibleRegion[8];
+ DVD_VideoAttributes VideoAttributes;
+ BOOL fAudioPresent;
+ DVD_AudioAttributes AudioAttributes;
+ BOOL fSubpicturePresent;
+ DVD_SubpictureAttributes SubpictureAttributes;
+} DVD_MenuAttributes;
+
+cpp_quote ("#define DVD_TITLE_MENU 0x000")
+cpp_quote ("#define DVD_STREAM_DATA_VMGM 0x400")
+cpp_quote ("#define DVD_STREAM_DATA_VTSM 0x401")
+cpp_quote ("#define DVD_STREAM_DATA_CURRENT 0x800")
+cpp_quote ("#define DVD_DEFAULT_AUDIO_STREAM 0x00f")
+
+cpp_quote ("#define DVD_AUDIO_CAPS_AC3 0x00000001")
+cpp_quote ("#define DVD_AUDIO_CAPS_MPEG2 0x00000002")
+cpp_quote ("#define DVD_AUDIO_CAPS_LPCM 0x00000004")
+cpp_quote ("#define DVD_AUDIO_CAPS_DTS 0x00000008")
+cpp_quote ("#define DVD_AUDIO_CAPS_SDDS 0x00000010")
+
+typedef struct tagDVD_DECODER_CAPS
+{
+ DWORD dwSize;
+ DWORD dwAudioCaps;
+ double dFwdMaxRateVideo;
+ double dFwdMaxRateAudio;
+ double dFwdMaxRateSP;
+ double dBwdMaxRateVideo;
+ double dBwdMaxRateAudio;
+ double dBwdMaxRateSP;
+ DWORD dwRes1;
+ DWORD dwRes2;
+ DWORD dwRes3;
+ DWORD dwRes4;
+} DVD_DECODER_CAPS;
+
+typedef enum _AM_DVD_GRAPH_FLAGS
+{
+ AM_DVD_HWDEC_PREFER = 0x0001,
+ AM_DVD_HWDEC_ONLY = 0x0002,
+ AM_DVD_SWDEC_PREFER = 0x0004,
+ AM_DVD_SWDEC_ONLY = 0x0008,
+ AM_DVD_NOVPE = 0x0100,
+ AM_DVD_DO_NOT_CLEAR = 0x0200,
+ AM_DVD_VMR9_ONLY = 0x0800,
+ AM_DVD_EVR_ONLY = 0x1000,
+ AM_DVD_EVR_QOS = 0x2000,
+ AM_DVD_ADAPT_GRAPH = 0x4000,
+ AM_DVD_MASK = 0xffff
+} AM_DVD_GRAPH_FLAGS;
+
+typedef enum _AM_DVD_STREAM_FLAGS
+{
+ AM_DVD_STREAM_VIDEO = 0x01,
+ AM_DVD_STREAM_AUDIO = 0x02,
+ AM_DVD_STREAM_SUBPIC = 0x04
+} AM_DVD_STREAM_FLAGS;
+
+typedef struct tagAM_DVD_RENDERSTATUS
+{
+ HRESULT hrVPEStatus;
+ BOOL bDvdVolInvalid;
+ BOOL bDvdVolUnknown;
+ BOOL bNoLine21In;
+ BOOL bNoLine21Out;
+ int iNumStreams;
+ int iNumStreamsFailed;
+ DWORD dwFailedStreamsFlag;
+} AM_DVD_RENDERSTATUS;
+
+[
+ local,
+ object,
+ uuid(a70efe61-e2a3-11d0-a9be-00aa0061be93),
+]
+interface IDvdControl : IUnknown
+{
+ HRESULT TitlePlay([in] ULONG title);
+ HRESULT ChapterPlay([in] ULONG title, [in] ULONG chapter);
+ HRESULT TimePlay([in] ULONG title, [in] ULONG time);
+ HRESULT StopForResume();
+ HRESULT GoUp();
+ HRESULT TimeSearch([in] ULONG time);
+ HRESULT ChapterSearch([in] ULONG chapter);
+ HRESULT PrevPGSearch();
+ HRESULT TopPGSearch();
+ HRESULT NextPGSearch();
+ HRESULT ForwardScan([in] double speed);
+ HRESULT BackwardScan([in] double speed);
+ HRESULT MenuCall([in] DVD_MENU_ID id);
+ HRESULT Resume();
+ HRESULT UpperButtonSelect();
+ HRESULT LowerButtonSelect();
+ HRESULT LeftButtonSelect();
+ HRESULT RightButtonSelect();
+ HRESULT ButtonActivate();
+ HRESULT ButtonSelectActivate([in] ULONG button);
+ HRESULT StillOff();
+ HRESULT PauseOn();
+ HRESULT PauseOff();
+ HRESULT MenuLanguageSelect([in] LCID language);
+ HRESULT AudioStreamChange([in] ULONG audio);
+ HRESULT SubpictureStreamChange([in] ULONG subpicture, [in] BOOL enable);
+ HRESULT AngleChange([in] ULONG angle);
+ HRESULT ParentalLevelSelect([in] ULONG level);
+ HRESULT ParentalCountrySelect([in] WORD country);
+ HRESULT KaraokeAudioPresentationModeChange([in] ULONG mode);
+ HRESULT VideoModePreference([in] ULONG mode);
+ HRESULT SetRoot([in] const WCHAR *path);
+ HRESULT MouseActivate([in] POINT point);
+ HRESULT MouseSelect([in] POINT point);
+ HRESULT ChapterPlayAutoStop([in] ULONG title, [in] ULONG chapter, [in] ULONG count);
+}
+
+[
+ local,
+ object,
+ uuid(a70efe60-e2a3-11d0-a9be-00aa0061be93),
+]
+interface IDvdInfo : IUnknown
+{
+ HRESULT GetCurrentDomain([out] DVD_DOMAIN *domain);
+ HRESULT GetCurrentLocation([out] DVD_PLAYBACK_LOCATION *location);
+ HRESULT GetTotalTitleTime([out] ULONG *time);
+ HRESULT GetCurrentButton([out] ULONG *count, [out] ULONG *current);
+ HRESULT GetCurrentAngle([out] ULONG *count, [out] ULONG *current);
+ HRESULT GetCurrentAudio([out] ULONG *count, [out] ULONG *current);
+ HRESULT GetCurrentSubpicture([out] ULONG *count, [out] ULONG *current, [out] BOOL *enable);
+ HRESULT GetCurrentUOPS([out] VALID_UOP_SOMTHING_OR_OTHER *uops);
+ HRESULT GetAllSPRMs([out] SPRMARRAY *regs);
+ HRESULT GetAllGPRMs([out] GPRMARRAY *regs);
+ HRESULT GetAudioLanguage([in] ULONG stream, [out] LCID *language);
+ HRESULT GetSubpictureLanguage([in] ULONG stream, [out] LCID *language);
+ HRESULT GetTitleAttributes([in] ULONG title, [out] DVD_ATR *attr);
+ HRESULT GetVMGAttributes([out] DVD_ATR *attr);
+ HRESULT GetCurrentVideoAttributes([out] DVD_VideoATR *attr);
+ HRESULT GetCurrentAudioAttributes([out] DVD_AudioATR *attr);
+ HRESULT GetCurrentSubpictureAttributes([out] DVD_SubpictureATR *attr);
+ HRESULT GetCurrentVolumeInfo([out] ULONG *volume_count, [out] ULONG *current, [out] DVD_DISC_SIDE *side, [out] ULONG *title_count);
+ HRESULT GetDVDTextInfo([out, size_is(size)] BYTE *text_manager, [in] ULONG size, [out] ULONG *ret_size);
+ HRESULT GetPlayerParentalLevel([out] ULONG *level, [out] ULONG *country_code);
+ HRESULT GetNumberOfChapters([in] ULONG title, [out] ULONG *count);
+ HRESULT GetTitleParentalLevels([in] ULONG title, [out] ULONG *levels);
+ HRESULT GetRoot([out, size_is(size)] char *path, [in] ULONG size, [out] ULONG *ret_size);
+}
+
+[
+ local,
+ object,
+ uuid(5a4a97e4-94ee-4a55-9751-74b5643aa27d),
+]
+interface IDvdCmd : IUnknown
+{
+ HRESULT WaitForStart();
+ HRESULT WaitForEnd();
+}
+
+[
+ local,
+ object,
+ uuid(86303d6d-1c4a-4087-ab42-f711167048ef),
+]
+interface IDvdState : IUnknown
+{
+ HRESULT GetDiscID([out] ULONGLONG *id);
+ HRESULT GetParentalLevel([out] ULONG *level);
+}
+
+[
+ local,
+ object,
+ uuid(33bc7430-eec0-11d2-8201-00a0c9d74842),
+]
+interface IDvdControl2 : IUnknown
+{
+ HRESULT PlayTitle([in] ULONG title, [in] DWORD flags, [out] IDvdCmd **cmd);
+ HRESULT PlayChapterInTitle([in] ULONG title, [in] ULONG chapter, [in] DWORD flags, [out] IDvdCmd **cmd);
+ HRESULT PlayTimeInTitle([in] ULONG title, [in] DVD_HMSF_TIMECODE *time, [in] DWORD flags, [out] IDvdCmd **cmd);
+ HRESULT Stop();
+ HRESULT ReturnFromSubmenu([in] DWORD flags, [out] IDvdCmd **cmd);
+ HRESULT PlayAtTime([in] DVD_HMSF_TIMECODE *time, [in] DWORD flags, [out] IDvdCmd **cmd);
+ HRESULT PlayChapter([in] ULONG chapter, [in] DWORD flags, [out] IDvdCmd **cmd);
+ HRESULT PlayPrevChapter([in] DWORD flags, [out] IDvdCmd **cmd);
+ HRESULT ReplayChapter([in] DWORD flags, [out] IDvdCmd **cmd);
+ HRESULT PlayNextChapter([in] DWORD flags, [out] IDvdCmd **cmd);
+ HRESULT PlayForwards([in] double speed, [in] DWORD flags, [out] IDvdCmd **cmd);
+ HRESULT PlayBackwards([in] double speed, [in] DWORD flags, [out] IDvdCmd **cmd);
+ HRESULT ShowMenu([in] DVD_MENU_ID id, [in] DWORD flags, [out] IDvdCmd **cmd);
+ HRESULT Resume([in] DWORD flags, [out] IDvdCmd **cmd);
+ HRESULT SelectRelativeButton([in] DVD_RELATIVE_BUTTON button);
+ HRESULT ActivateButton();
+ HRESULT SelectButton([in] ULONG button);
+ HRESULT SelectAndActivateButton([in] ULONG button);
+ HRESULT StillOff();
+ HRESULT Pause([in] BOOL enable);
+ HRESULT SelectAudioStream([in] ULONG stream, [in] DWORD flags, [out] IDvdCmd **cmd);
+ HRESULT SelectSubpictureStream([in] ULONG stream, [in] DWORD flags, [out] IDvdCmd **cmd);
+ HRESULT SetSubpictureState([in] BOOL enable, [in] DWORD flags, [out] IDvdCmd **cmd);
+ HRESULT SelectAngle([in] ULONG angle, [in] DWORD flags, [out] IDvdCmd **cmd);
+ HRESULT SelectParentalLevel([in] ULONG level);
+ HRESULT SelectParentalCountry([in] BYTE country[2]);
+ HRESULT SelectKaraokeAudioPresentationMode([in] ULONG mode);
+ HRESULT SelectVideoModePreference([in] ULONG mode);
+ HRESULT SetDVDDirectory([in] const WCHAR *path);
+ HRESULT ActivateAtPosition([in] POINT point);
+ HRESULT SelectAtPosition([in] POINT point);
+ HRESULT PlayChaptersAutoStop([in] ULONG title, [in] ULONG chapter, [in] ULONG count, [in] DWORD flags, [out] IDvdCmd **cmd);
+ HRESULT AcceptParentalLevelChange([in] BOOL accept);
+ HRESULT SetOption([in] DVD_OPTION_FLAG flag, [in] BOOL option);
+ HRESULT SetState([in] IDvdState *state, [in] DWORD flags, [out] IDvdCmd **cmd);
+ HRESULT PlayPeriodInTitleAutoStop([in] ULONG title, [in] DVD_HMSF_TIMECODE *start_time, [in] DVD_HMSF_TIMECODE *end_time, [in] DWORD flags, [out] IDvdCmd **cmd);
+ HRESULT SetGRPM([in] ULONG index, [in] WORD value, [in] DWORD flags, [out] IDvdCmd **cmd);
+ HRESULT SelectDefaultMenuLanguage([in] LCID language);
+ HRESULT SelectDefaultAudioLanguage([in] LCID language, [in] DVD_AUDIO_LANG_EXT extension);
+ HRESULT SelectDefaultSubpictureLanguage([in] LCID language, [in] DVD_SUBPICTURE_LANG_EXT extension);
+}
+
+[
+ local,
+ object,
+ uuid(34151510-eec0-11d2-8201-00a0c9d74842),
+]
+interface IDvdInfo2 : IUnknown
+{
+ HRESULT GetCurrentDomain([out] DVD_DOMAIN *domain);
+ HRESULT GetCurrentLocation([out] DVD_PLAYBACK_LOCATION2 *location);
+ HRESULT GetTotalTitleTime([out] DVD_HMSF_TIMECODE *time, [out] ULONG *flags);
+ HRESULT GetCurrentButton([out] ULONG *count, [out] ULONG *current);
+ HRESULT GetCurrentAngle([out] ULONG *count, [out] ULONG *current);
+ HRESULT GetCurrentAudio([out] ULONG *count, [out] ULONG *current);
+ HRESULT GetCurrentSubpicture([out] ULONG *count, [out] ULONG *current, [out] BOOL *enable);
+ HRESULT GetCurrentUOPS([out] ULONG *uops);
+ HRESULT GetAllSPRMs([out] SPRMARRAY *regs);
+ HRESULT GetAllGPRMs([out] GPRMARRAY *regs);
+ HRESULT GetAudioLanguage([in] ULONG stream, [out] LCID *language);
+ HRESULT GetSubpictureLanguage([in] ULONG stream, [out] LCID *language);
+ HRESULT GetTitleAttributes([in] ULONG title, [out] DVD_MenuAttributes *menu, [out] DVD_TitleAttributes *title);
+ HRESULT GetVMGAttributes([out] DVD_MenuAttributes *attr);
+ HRESULT GetVideoAttributes([out] DVD_VideoAttributes *attr);
+ HRESULT GetAudioAttributes([in] ULONG stream, [out] DVD_AudioAttributes *attr);
+ HRESULT GetKaraokeAttributes([in] ULONG stream, [out] DVD_KaraokeAttributes *attr);
+ HRESULT GetSubpictureAttributes([in] ULONG stream, [out] DVD_SubpictureAttributes *attr);
+ HRESULT GetCurrentVolumeInfo([out] ULONG *volume_count, [out] ULONG *current, [out] DVD_DISC_SIDE *side, [out] ULONG *title_count);
+ HRESULT GetDVDTextNumberOfLanguages([out] ULONG *count);
+ HRESULT GetDVDTextLanguageInfo([in] ULONG index, [out] ULONG *string_count, [out] LCID *language, [out] enum DVD_TextCharSet *character_set);
+ HRESULT GetDVDTextStringAsNative([in] ULONG lang_index, [in] ULONG string_index, [out] BYTE *string, [in] ULONG size, [out] ULONG *ret_size, [out] enum DVD_TextStringType *type);
+ HRESULT GetDVDTextStringAsUnicode([in] ULONG lang_index, [in] ULONG string_index, [out] WCHAR *string, [in] ULONG size, [out] ULONG *ret_size, [out] enum DVD_TextStringType *type);
+ HRESULT GetPlayerParentalLevel([out] ULONG *level, [out] BYTE country_code[2]);
+ HRESULT GetNumberOfChapters([in] ULONG title, [out] ULONG *count);
+ HRESULT GetTitleParentalLevels([in] ULONG title, [out] ULONG *levels);
+ HRESULT GetDVDDirectory([out, size_is(size)] WCHAR *path, [in] ULONG size, [out] ULONG *ret_size);
+ HRESULT IsAudioStreamEnabled([in] ULONG stream, [out] BOOL *enable);
+ HRESULT GetDiscID([in] const WCHAR *path, [out] ULONGLONG *id);
+ HRESULT GetState([out] IDvdState **state);
+ HRESULT GetMenuLanguages([out] LCID *languages, [in] ULONG count, [out] ULONG *ret_count);
+ HRESULT GetButtonAtPosition([in] POINT point, [out] ULONG *button);
+ HRESULT GetCmdFromEvent([in] LONG_PTR param, [out] IDvdCmd **cmd);
+ HRESULT GetDefaultMenuLanguage([out] LCID *language);
+ HRESULT GetDefaultAudioLanguage([out] LCID *language, [out] DVD_AUDIO_LANG_EXT *extension);
+ HRESULT SelectDefaultSubpictureLanguage([out] LCID *language, [out] DVD_SUBPICTURE_LANG_EXT *extension);
+ HRESULT GetDecoderCaps([out] DVD_DECODER_CAPS *caps);
+ HRESULT GetButtonRect([in] ULONG button, [out] RECT *rect);
+ HRESULT IsSubpictureStreamEnabled([in] ULONG stream, [out] BOOL *enable);
+}
+
+[
+ local,
+ object,
+ uuid(fcc152b6-f372-11d0-8e00-00c04fd7c08b),
+]
+interface IDvdGraphBuilder : IUnknown
+{
+ HRESULT GetFiltergraph([out] IGraphBuilder **graph);
+ HRESULT GetDvdInterface([in] REFIID iid, [out] void **out);
+ HRESULT RenderDvdVideoVolume([in] const WCHAR *path, [in] DWORD flags, [out] AM_DVD_RENDERSTATUS *status);
+}
diff --git a/include/strmif.idl b/include/strmif.idl
index a06f99b751..8c140dcbfd 100644
--- a/include/strmif.idl
+++ b/include/strmif.idl
@@ -20,12 +20,8 @@ import "unknwn.idl";
import "objidl.idl";
#include <devenum.idl>
-
#include <axcore.idl>
-
#include <axextend.idl>
-
#include <dyngraph.idl>
-
-/* TODO: #include <dvdif.h> */
#include <vmrender.idl>
+#include <dvdif.idl>
--
2.26.2
April 29, 2020
Re: Preparing Wine 5.0.1 for GCC 10
by Rosanne DiMesio
On Wed, 29 Apr 2020 21:18:18 +0200
Michael Stefaniuc <mstefani(a)winehq.org> wrote:
>
> Where did you look for it on the wiki? Just as a hint where it might
> make sense to add it.
> In theory it should go to the Developer section. But new developers
> don't come to Wine for Stable. And longer term developers see my emails
> on wine-devel so wouldn't go to the Developer section for that information.
>
Maybe a "see also" link at the bottom of the Submitting Patches page?
--
Rosanne DiMesio
dimesio(a)earthlink.net
April 29, 2020
Re: [PATCH 2/2] include: Use long for LONG type on Windows targets iff not building Wine.
by Jacek Caban
On 29.04.2020 22:44, Alexandre Julliard wrote:
> Jacek Caban <jacek(a)codeweavers.com> writes:
>
>> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com>
>> ---
>>
>> Right now we use _MSC_VER to choose between long and int type. We
>> could, however, make any other choice. With patch 1, it's possible to
>> use int with MSVC (or at least clang MSVC target). It's also possible
>> for any other compilers except __LP64__ to use long.
>>
>> This raises some questions and I wouldn't mind changing the patch. For
>> example, I could change headers to always use int. The problem with
>> that is that it makes us incompatible with the rest of Windows world.
>>
>> In the past, the choice of int for LONG was motivated by port to
>> Win64, where we can't use long on UNIX side and it's nice to have the
>> same time on all targets.
>>
>> This patch is a compromise: it always uses int for Wine itself, so as
>> far as building Wine is considered, it's consistent among
>> compilers. Outside Wine, it uses long on Windows targets, where the
>> code is most likely to depend on underlying type. And it keeps using
>> int for non-Windows targets, so nothing changes for non-PE winelib.
>>
>> If there is a need for int LONG on Windows targets, we could introduce
>> a macro to change that choice. I could also imagine revisiting the
>> choice for PE parts of Wine itself, but it would be a lot of work.
> All of these options are of course possible, but it doesn't seem to me
> that any of them has a clear advantage over what we are doing now. Are
> there real problems with the current approach that we need to address?
The main problem that I tried to address is that with current approach,
building Wine itself in MSVC mode causes a lot of format warnings and
some incompatible pointer type warnings. That's because MSVC is #ifdefed
to use long. To fix that problem, we probably could just remove MSVC
ifdef and always use int, but entirely removing support for using long
doesn't seem right to me. Maybe change #ifdef _MSV_VER with some WINE_*
opt-in macro?
Thanks,
Jacek
April 29, 2020
Re: [PATCH 2/2] include: Use long for LONG type on Windows targets iff not building Wine.
by Alexandre Julliard
Jacek Caban <jacek(a)codeweavers.com> writes:
> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com>
> ---
>
> Right now we use _MSC_VER to choose between long and int type. We
> could, however, make any other choice. With patch 1, it's possible to
> use int with MSVC (or at least clang MSVC target). It's also possible
> for any other compilers except __LP64__ to use long.
>
> This raises some questions and I wouldn't mind changing the patch. For
> example, I could change headers to always use int. The problem with
> that is that it makes us incompatible with the rest of Windows world.
>
> In the past, the choice of int for LONG was motivated by port to
> Win64, where we can't use long on UNIX side and it's nice to have the
> same time on all targets.
>
> This patch is a compromise: it always uses int for Wine itself, so as
> far as building Wine is considered, it's consistent among
> compilers. Outside Wine, it uses long on Windows targets, where the
> code is most likely to depend on underlying type. And it keeps using
> int for non-Windows targets, so nothing changes for non-PE winelib.
>
> If there is a need for int LONG on Windows targets, we could introduce
> a macro to change that choice. I could also imagine revisiting the
> choice for PE parts of Wine itself, but it would be a lot of work.
All of these options are of course possible, but it doesn't seem to me
that any of them has a clear advantage over what we are doing now. Are
there real problems with the current approach that we need to address?
--
Alexandre Julliard
julliard(a)winehq.org
April 29, 2020
Re: Preparing Wine 5.0.1 for GCC 10
by Michael Stefaniuc
On 4/28/20 11:48 PM, Gerald Pfeifer wrote:
> On Tue, 28 Apr 2020, Jactry Zeng wrote:
>> Stable branch is maintained by Michael: https://wiki.winehq.org/Stable_Rules
>
> Thank you, Jactry, for that helpful pointer!
>
> I had a look, and https://wiki.winehq.org/Special:WhatLinksHere/Stable_Rules
> indicates no other page is linking to that one (short of a redirect)?
I'm linking from outside to it:
https://people.redhat.com/mstefani/wine/stable/
https://github.com/mstefani/wine-stable
Those are the links I'm including in my Stable rc emails.
Where did you look for it on the wiki? Just as a hint where it might
make sense to add it.
In theory it should go to the Developer section. But new developers
don't come to Wine for Stable. And longer term developers see my emails
on wine-devel so wouldn't go to the Developer section for that information.
> On Tue, 28 Apr 2020, Michael Stefaniuc wrote:
>> Thanks for the patch list Gerald.
>> I need to upgrade to Fedora 32 so I'll be on gcc 10 anyway during 5.0.x
>
> Great, thank you, Michael!
>
> Do you already have a date for 5.0.1 in mind?
If all goes well: mid May.
bye
michael
April 29, 2020