Before 9168091a46 htonl() was used to convert
the values to/from enum to the string. But that commit broke the conversion on
little endian machines.
Now we don't use an intermediate string anymore. We just use GetDWBE() to do
the endianness conversion of the char buffer if needed.
The mode can never be NULL. If it was, autodetect is set to false so we never
reach this code.
We can optimize the strlen() calls with a single strnlen() call that will only
test up to 5 chars to check we don't have 3 or 4 chars.
The class has virtual functions and is calling `delete this;` so it
triggers a warning if the class has no virtual destructors.
modules/access/decklink.cpp: In member function ‘virtual ULONG {anonymous}::DeckLinkCaptureDelegate::Release()’:
modules/access/decklink.cpp:268:13: warning: deleting object of polymorphic class type ‘{anonymous}::DeckLinkCaptureDelegate’ which has non-virtual destructor might cause undefined behavior [-Wdelete-non-virtual-dtor]
268 | delete this;
| ^~~~~~~~~~~
see e967f81f6a.
note, this does **not** affect cat-based module selection items
(of which there are just three in use by the core), since that
mechanism uses subcats not cats.
DeckLinkAPIDispatch.cpp doesn't exist on Windows and CreateDeckLinkIteratorInstance()
too. Instead we should use CoCreateInstance().
The strings are BSTR.
Use the proper enum values where appropriate.
Some types are different between Windows and Linux/macOS.
The config "advanced" flag was unused and has been removed by
6a7a137f7b.
It has been removed from many add_*() macros, but not all. Remove it
from the remaining macros.
The Decklink SDK has platform-specific implementations for various
calls which return strings. Add some portability macros to
properly handle those calls and then normalize the result down to
a C char * as we would typically see in VLC.
Signed-off-by: Devin Heitmueller <dheitmueller@ltnglobal.com>
In order to respect ODR, in C++ code, declare *_sys_t types in a
separate namespace, either unnamed if it's used only in one translation
unit, or named otherwise.
The GUI modules qt and skins2 are left unchanged for now.
See #17078 and #18033
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
A combined access-demux cannot be instantiated without an ES output.
This checks that the ES output is present, avoiding crashes for
instance with vlc_stream_NewURL().
Check if the card reports yuv or rgb input and set the codec format
accordingly.
Signed-off-by: Julian Scheel <julian@jusst.de>
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
A properly set chroma field is required for automatic filter selection
to work. As this is raw video chroma and codec are equal.
Signed-off-by: Julian Scheel <julian@jusst.de>
Signed-off-by: Ilkka Ollakka <ileoo@videolan.org>