2 * Blackmagic DeckLink common code
3 * Copyright (c) 2013-2014 Ramiro Polla, Luca Barbato, Deti Fliegl
5 * This file is part of FFmpeg.
7 * FFmpeg is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * FFmpeg is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with FFmpeg; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 #include "decklink_common_c.h"
24 class decklink_output_callback
;
25 class decklink_input_callback
;
27 typedef struct AVPacketQueue
{
28 AVPacketList
*first_pkt
, *last_pkt
;
30 unsigned long long size
;
32 pthread_mutex_t mutex
;
34 AVFormatContext
*avctx
;
38 /* DeckLink SDK interfaces */
42 decklink_output_callback
*output_callback
;
43 decklink_input_callback
*input_callback
;
45 /* DeckLink mode information */
46 BMDTimeValue bmd_tb_den
;
47 BMDTimeValue bmd_tb_num
;
48 BMDDisplayMode bmd_mode
;
51 int bmd_field_dominance
;
53 /* Capture buffer queue */
64 unsigned long frameCount
;
82 typedef enum { DIRECTION_IN
, DIRECTION_OUT
} decklink_direction_t
;
85 typedef unsigned long buffercount_type
;
86 IDeckLinkIterator
*CreateDeckLinkIteratorInstance(void);
88 typedef uint32_t buffercount_type
;
92 HRESULT
ff_decklink_get_display_name(IDeckLink
*This
, const char **displayName
);
93 int ff_decklink_set_format(AVFormatContext
*avctx
, int width
, int height
, int tb_num
, int tb_den
, decklink_direction_t direction
= DIRECTION_OUT
, int num
= 0);
94 int ff_decklink_set_format(AVFormatContext
*avctx
, decklink_direction_t direction
, int num
);
95 int ff_decklink_list_devices(AVFormatContext
*avctx
);
96 int ff_decklink_list_formats(AVFormatContext
*avctx
, decklink_direction_t direction
= DIRECTION_OUT
);