FFmpeg
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
libavdevice
decklink_common.h
Go to the documentation of this file.
1
/*
2
* Blackmagic DeckLink common code
3
* Copyright (c) 2013-2014 Ramiro Polla, Luca Barbato, Deti Fliegl
4
*
5
* This file is part of FFmpeg.
6
*
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.
11
*
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.
16
*
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
20
*/
21
22
#include "
decklink_common_c.h
"
23
24
class
decklink_output_callback
;
25
class
decklink_input_callback
;
26
27
typedef
struct
AVPacketQueue
{
28
AVPacketList
*
first_pkt
, *
last_pkt
;
29
int
nb_packets
;
30
unsigned
long
long
size
;
31
int
abort_request
;
32
pthread_mutex_t
mutex
;
33
pthread_cond_t
cond
;
34
AVFormatContext
*
avctx
;
35
}
AVPacketQueue
;
36
37
struct
decklink_ctx
{
38
/* DeckLink SDK interfaces */
39
IDeckLink *
dl
;
40
IDeckLinkOutput *
dlo
;
41
IDeckLinkInput *
dli
;
42
decklink_output_callback
*
output_callback
;
43
decklink_input_callback
*
input_callback
;
44
45
/* DeckLink mode information */
46
BMDTimeValue
bmd_tb_den
;
47
BMDTimeValue
bmd_tb_num
;
48
BMDDisplayMode
bmd_mode
;
49
int
bmd_width
;
50
int
bmd_height
;
51
int
bmd_field_dominance
;
52
53
/* Capture buffer queue */
54
AVPacketQueue
queue
;
55
56
/* Streams present */
57
int
audio
;
58
int
video
;
59
60
/* Status */
61
int
playback_started
;
62
int
capture_started
;
63
int64_t
last_pts
;
64
unsigned
long
frameCount
;
65
unsigned
int
dropped
;
66
AVStream
*
audio_st
;
67
AVStream
*
video_st
;
68
69
/* Options */
70
int
list_devices
;
71
int
list_formats
;
72
double
preroll
;
73
74
int
frames_preroll
;
75
int
frames_buffer
;
76
77
sem_t
semaphore
;
78
79
int
channels
;
80
};
81
82
typedef
enum
{
DIRECTION_IN
,
DIRECTION_OUT
}
decklink_direction_t
;
83
84
#ifdef _WIN32
85
typedef
unsigned
long
buffercount_type
;
86
IDeckLinkIterator *CreateDeckLinkIteratorInstance(
void
);
87
#else
88
typedef
uint32_t
buffercount_type
;
89
#endif
90
91
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
);
97
AVPacketQueue::cond
pthread_cond_t cond
Definition:
decklink_common.h:33
AVFormatContext
Format I/O context.
Definition:
avformat.h:1272
AVPacketQueue::nb_packets
int nb_packets
Definition:
decklink_common.h:29
decklink_ctx::dropped
unsigned int dropped
Definition:
decklink_common.h:65
pthread_mutex_t
HMTX pthread_mutex_t
Definition:
os2threads.h:40
decklink_ctx::dl
IDeckLink * dl
Definition:
decklink_common.h:39
DIRECTION_IN
Definition:
decklink_common.h:82
AVPacketQueue::mutex
pthread_mutex_t mutex
Definition:
decklink_common.h:32
DIRECTION_OUT
Definition:
decklink_common.h:82
ff_decklink_get_display_name
HRESULT ff_decklink_get_display_name(IDeckLink *This, const char **displayName)
Definition:
decklink_common.cpp:90
pthread_cond_t
Definition:
os2threads.h:43
AVPacketList
Definition:
avformat.h:1844
decklink_ctx::bmd_tb_num
BMDTimeValue bmd_tb_num
Definition:
decklink_common.h:47
decklink_ctx::bmd_width
int bmd_width
Definition:
decklink_common.h:49
decklink_ctx::output_callback
decklink_output_callback * output_callback
Definition:
decklink_common.h:42
decklink_ctx::list_devices
int list_devices
Definition:
decklink_common.h:70
decklink_ctx::video_st
AVStream * video_st
Definition:
decklink_common.h:67
decklink_ctx::audio
int audio
Definition:
decklink_common.h:57
AVPacketQueue::last_pkt
AVPacketList * last_pkt
Definition:
decklink_common.h:28
decklink_ctx::list_formats
int list_formats
Definition:
decklink_common.h:71
ff_decklink_list_formats
int ff_decklink_list_formats(AVFormatContext *avctx, decklink_direction_t direction=DIRECTION_OUT)
Definition:
decklink_common.cpp:200
decklink_ctx
Definition:
decklink_common.h:37
AVPacketQueue::abort_request
int abort_request
Definition:
decklink_common.h:31
decklink_common_c.h
decklink_ctx::channels
int channels
Definition:
decklink_common.h:79
decklink_ctx::frames_buffer
int frames_buffer
Definition:
decklink_common.h:75
AVPacketQueue::first_pkt
AVPacketList * first_pkt
Definition:
decklink_common.h:28
AVPacketQueue::size
unsigned long long size
Definition:
decklink_common.h:30
decklink_ctx::playback_started
int playback_started
Definition:
decklink_common.h:61
decklink_ctx::dli
IDeckLinkInput * dli
Definition:
decklink_common.h:41
decklink_ctx::queue
AVPacketQueue queue
Definition:
decklink_common.h:54
buffercount_type
uint32_t buffercount_type
Definition:
decklink_common.h:88
decklink_ctx::frameCount
unsigned long frameCount
Definition:
decklink_common.h:64
decklink_ctx::semaphore
sem_t semaphore
Definition:
decklink_common.h:77
AVStream
Stream structure.
Definition:
avformat.h:842
AVPacketQueue
Definition:
decklink_common.h:27
height
BYTE int const BYTE int int int height
Definition:
avisynth_c.h:676
decklink_ctx::audio_st
AVStream * audio_st
Definition:
decklink_common.h:66
decklink_direction_t
decklink_direction_t
Definition:
decklink_common.h:82
decklink_ctx::bmd_field_dominance
int bmd_field_dominance
Definition:
decklink_common.h:51
AVPacketQueue::avctx
AVFormatContext * avctx
Definition:
decklink_common.h:34
HRESULT
DWORD HRESULT
Definition:
basicDataTypeConversions.h:54
decklink_ctx::input_callback
decklink_input_callback * input_callback
Definition:
decklink_common.h:43
decklink_ctx::frames_preroll
int frames_preroll
Definition:
decklink_common.h:74
decklink_ctx::bmd_mode
BMDDisplayMode bmd_mode
Definition:
decklink_common.h:48
decklink_ctx::preroll
double preroll
Definition:
decklink_common.h:72
decklink_ctx::bmd_height
int bmd_height
Definition:
decklink_common.h:50
decklink_ctx::capture_started
int capture_started
Definition:
decklink_common.h:62
decklink_ctx::last_pts
int64_t last_pts
Definition:
decklink_common.h:63
decklink_ctx::dlo
IDeckLinkOutput * dlo
Definition:
decklink_common.h:40
decklink_output_callback
Definition:
decklink_enc.cpp:70
decklink_ctx::video
int video
Definition:
decklink_common.h:58
ff_decklink_set_format
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)
Definition:
decklink_common.cpp:101
decklink_ctx::bmd_tb_den
BMDTimeValue bmd_tb_den
Definition:
decklink_common.h:46
decklink_input_callback
Definition:
decklink_dec.cpp:147
ff_decklink_list_devices
int ff_decklink_list_devices(AVFormatContext *avctx)
Definition:
decklink_common.cpp:180
width
static int width
Definition:
demuxing_decoding.c:39
Generated on Wed Jun 10 2015 01:56:52 for FFmpeg by
1.8.6