Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
b18d6c58
Commit
b18d6c58
authored
8 years ago
by
Marton Balint
Browse files
Options
Downloads
Patches
Plain Diff
avdevice/decklink: fix mingw portability
Fixes ticket #5669. Signed-off-by:
Marton Balint
<
cus@passwd.hu
>
parent
729d82ab
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libavdevice/decklink_common.cpp
+5
-2
5 additions, 2 deletions
libavdevice/decklink_common.cpp
libavdevice/decklink_common.h
+2
-2
2 additions, 2 deletions
libavdevice/decklink_common.h
with
7 additions
and
4 deletions
libavdevice/decklink_common.cpp
+
5
−
2
View file @
b18d6c58
...
...
@@ -70,6 +70,7 @@ static char *dup_wchar_to_utf8(wchar_t *w)
#define DECKLINK_STR OLECHAR *
#define DECKLINK_STRDUP dup_wchar_to_utf8
#define DECKLINK_FREE(s) SysFreeString(s)
#define DECKLINK_BOOL BOOL
#elif defined(__APPLE__)
static
char
*
dup_cfstring_to_utf8
(
CFStringRef
w
)
{
...
...
@@ -80,11 +81,13 @@ static char *dup_cfstring_to_utf8(CFStringRef w)
#define DECKLINK_STR const __CFString *
#define DECKLINK_STRDUP dup_cfstring_to_utf8
#define DECKLINK_FREE(s) free((void *) s)
#define DECKLINK_BOOL bool
#else
#define DECKLINK_STR const char *
#define DECKLINK_STRDUP av_strdup
/* free() is needed for a string returned by the DeckLink SDL. */
#define DECKLINK_FREE(s) free((void *) s)
#define DECKLINK_BOOL bool
#endif
HRESULT
ff_decklink_get_display_name
(
IDeckLink
*
This
,
const
char
**
displayName
)
...
...
@@ -103,7 +106,7 @@ static int decklink_select_input(AVFormatContext *avctx, BMDDeckLinkConfiguratio
struct
decklink_cctx
*
cctx
=
(
struct
decklink_cctx
*
)
avctx
->
priv_data
;
struct
decklink_ctx
*
ctx
=
(
struct
decklink_ctx
*
)
cctx
->
ctx
;
BMDDeckLinkAttributeID
attr_id
=
(
cfg_id
==
bmdDeckLinkConfigAudioInputConnection
)
?
BMDDeckLinkAudioInputConnections
:
BMDDeckLinkVideoInputConnections
;
int64_t
bmd_input
=
(
cfg_id
==
bmdDeckLinkConfigAudioInputConnection
)
?
ctx
->
audio_input
:
ctx
->
video_input
;
int64_t
bmd_input
=
(
cfg_id
==
bmdDeckLinkConfigAudioInputConnection
)
?
(
int64_t
)
ctx
->
audio_input
:
(
int64_t
)
ctx
->
video_input
;
const
char
*
type_name
=
(
cfg_id
==
bmdDeckLinkConfigAudioInputConnection
)
?
"audio"
:
"video"
;
int64_t
supported_connections
=
0
;
HRESULT
res
;
...
...
@@ -141,7 +144,7 @@ int ff_decklink_set_format(AVFormatContext *avctx,
HRESULT
res
;
if
(
ctx
->
duplex_mode
)
{
bool
duplex_supported
=
false
;
DECKLINK_BOOL
duplex_supported
=
false
;
if
(
ctx
->
attr
->
GetFlag
(
BMDDeckLinkSupportsDuplexModeConfiguration
,
&
duplex_supported
)
!=
S_OK
)
duplex_supported
=
false
;
...
...
This diff is collapsed.
Click to expand it.
libavdevice/decklink_common.h
+
2
−
2
View file @
b18d6c58
...
...
@@ -107,7 +107,7 @@ typedef uint32_t buffercount_type;
#endif
static
const
BMDAudioConnection
decklink_audio_connection_map
[]
=
{
0
,
(
BMDAudioConnection
)
0
,
bmdAudioConnectionEmbedded
,
bmdAudioConnectionAESEBU
,
bmdAudioConnectionAnalog
,
...
...
@@ -117,7 +117,7 @@ static const BMDAudioConnection decklink_audio_connection_map[] = {
};
static
const
BMDVideoConnection
decklink_video_connection_map
[]
=
{
0
,
(
BMDVideoConnection
)
0
,
bmdVideoConnectionSDI
,
bmdVideoConnectionHDMI
,
bmdVideoConnectionOpticalSDI
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment