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
#ifndef AVDEVICE_DECKLINK_COMMON_H
23
#define AVDEVICE_DECKLINK_COMMON_H
24
25
#include <DeckLinkAPIVersion.h>
26
27
#include "
decklink_common_c.h
"
28
29
class
decklink_output_callback
;
30
class
decklink_input_callback
;
31
32
typedef
struct
AVPacketQueue
{
33
AVPacketList
*
first_pkt
, *
last_pkt
;
34
int
nb_packets
;
35
unsigned
long
long
size
;
36
int
abort_request
;
37
pthread_mutex_t
mutex
;
38
pthread_cond_t
cond
;
39
AVFormatContext
*
avctx
;
40
}
AVPacketQueue
;
41
42
struct
decklink_ctx
{
43
/* DeckLink SDK interfaces */
44
IDeckLink *
dl
;
45
IDeckLinkOutput *
dlo
;
46
IDeckLinkInput *
dli
;
47
decklink_output_callback
*
output_callback
;
48
decklink_input_callback
*
input_callback
;
49
50
/* DeckLink mode information */
51
BMDTimeValue
bmd_tb_den
;
52
BMDTimeValue
bmd_tb_num
;
53
BMDDisplayMode
bmd_mode
;
54
int
bmd_width
;
55
int
bmd_height
;
56
int
bmd_field_dominance
;
57
58
/* Capture buffer queue */
59
AVPacketQueue
queue
;
60
61
/* Streams present */
62
int
audio
;
63
int
video
;
64
65
/* Status */
66
int
playback_started
;
67
int
capture_started
;
68
int64_t
last_pts
;
69
unsigned
long
frameCount
;
70
unsigned
int
dropped
;
71
AVStream
*
audio_st
;
72
AVStream
*
video_st
;
73
AVStream
*
teletext_st
;
74
75
/* Options */
76
int
list_devices
;
77
int
list_formats
;
78
int64_t
teletext_lines
;
79
double
preroll
;
80
81
int
frames_preroll
;
82
int
frames_buffer
;
83
84
sem_t
semaphore
;
85
86
int
channels
;
87
};
88
89
typedef
enum
{
DIRECTION_IN
,
DIRECTION_OUT
}
decklink_direction_t
;
90
91
#ifdef _WIN32
92
#if BLACKMAGIC_DECKLINK_API_VERSION < 0x0a040000
93
typedef
unsigned
long
buffercount_type
;
94
#else
95
typedef
unsigned
int
buffercount_type
;
96
#endif
97
IDeckLinkIterator *CreateDeckLinkIteratorInstance(
void
);
98
#else
99
typedef
uint32_t
buffercount_type
;
100
#endif
101
102
103
HRESULT
ff_decklink_get_display_name
(IDeckLink *This,
const
char
**displayName);
104
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);
105
int
ff_decklink_set_format
(
AVFormatContext
*avctx,
decklink_direction_t
direction,
int
num);
106
int
ff_decklink_list_devices
(
AVFormatContext
*avctx);
107
int
ff_decklink_list_formats
(
AVFormatContext
*avctx,
decklink_direction_t
direction =
DIRECTION_OUT
);
108
109
#endif
/* AVDEVICE_DECKLINK_COMMON_H */
AVPacketQueue::cond
pthread_cond_t cond
Definition:
decklink_common.h:38
sem_t
#define sem_t
Definition:
semaphore.h:25
AVFormatContext
Format I/O context.
Definition:
avformat.h:1325
AVPacketQueue::nb_packets
int nb_packets
Definition:
decklink_common.h:34
decklink_ctx::teletext_lines
int64_t teletext_lines
Definition:
decklink_common.h:78
decklink_ctx::dropped
unsigned int dropped
Definition:
decklink_common.h:70
pthread_mutex_t
HMTX pthread_mutex_t
Definition:
os2threads.h:49
decklink_ctx::dl
IDeckLink * dl
Definition:
decklink_common.h:44
DIRECTION_IN
Definition:
decklink_common.h:89
AVPacketQueue::mutex
pthread_mutex_t mutex
Definition:
decklink_common.h:37
DIRECTION_OUT
Definition:
decklink_common.h:89
ff_decklink_get_display_name
HRESULT ff_decklink_get_display_name(IDeckLink *This, const char **displayName)
Definition:
decklink_common.cpp:90
height
#define height
pthread_cond_t
Definition:
os2threads.h:52
AVPacketList
Definition:
avformat.h:1932
decklink_ctx::bmd_tb_num
BMDTimeValue bmd_tb_num
Definition:
decklink_common.h:52
decklink_ctx::bmd_width
int bmd_width
Definition:
decklink_common.h:54
decklink_ctx::output_callback
decklink_output_callback * output_callback
Definition:
decklink_common.h:47
decklink_ctx::list_devices
int list_devices
Definition:
decklink_common.h:76
decklink_ctx::video_st
AVStream * video_st
Definition:
decklink_common.h:72
decklink_ctx::audio
int audio
Definition:
decklink_common.h:62
AVPacketQueue::last_pkt
AVPacketList * last_pkt
Definition:
decklink_common.h:33
decklink_ctx::list_formats
int list_formats
Definition:
decklink_common.h:77
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:42
AVPacketQueue::abort_request
int abort_request
Definition:
decklink_common.h:36
decklink_ctx::teletext_st
AVStream * teletext_st
Definition:
decklink_common.h:73
decklink_common_c.h
decklink_ctx::channels
int channels
Definition:
decklink_common.h:86
decklink_ctx::frames_buffer
int frames_buffer
Definition:
decklink_common.h:82
AVPacketQueue::first_pkt
AVPacketList * first_pkt
Definition:
decklink_common.h:33
AVPacketQueue::size
unsigned long long size
Definition:
decklink_common.h:35
width
#define width
decklink_ctx::playback_started
int playback_started
Definition:
decklink_common.h:66
decklink_ctx::dli
IDeckLinkInput * dli
Definition:
decklink_common.h:46
decklink_ctx::queue
AVPacketQueue queue
Definition:
decklink_common.h:59
buffercount_type
uint32_t buffercount_type
Definition:
decklink_common.h:99
decklink_ctx::frameCount
unsigned long frameCount
Definition:
decklink_common.h:69
decklink_ctx::semaphore
sem_t semaphore
Definition:
decklink_common.h:84
AVStream
Stream structure.
Definition:
avformat.h:876
AVPacketQueue
Definition:
decklink_common.h:32
decklink_ctx::audio_st
AVStream * audio_st
Definition:
decklink_common.h:71
decklink_direction_t
decklink_direction_t
Definition:
decklink_common.h:89
decklink_ctx::bmd_field_dominance
int bmd_field_dominance
Definition:
decklink_common.h:56
AVPacketQueue::avctx
AVFormatContext * avctx
Definition:
decklink_common.h:39
HRESULT
DWORD HRESULT
Definition:
basicDataTypeConversions.h:54
decklink_ctx::input_callback
decklink_input_callback * input_callback
Definition:
decklink_common.h:48
decklink_ctx::frames_preroll
int frames_preroll
Definition:
decklink_common.h:81
decklink_ctx::bmd_mode
BMDDisplayMode bmd_mode
Definition:
decklink_common.h:53
decklink_ctx::preroll
double preroll
Definition:
decklink_common.h:79
decklink_ctx::bmd_height
int bmd_height
Definition:
decklink_common.h:55
decklink_ctx::capture_started
int capture_started
Definition:
decklink_common.h:67
decklink_ctx::last_pts
int64_t last_pts
Definition:
decklink_common.h:68
decklink_ctx::dlo
IDeckLinkOutput * dlo
Definition:
decklink_common.h:45
decklink_output_callback
Definition:
decklink_enc.cpp:70
decklink_ctx::video
int video
Definition:
decklink_common.h:63
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:51
decklink_input_callback
Definition:
decklink_dec.cpp:180
ff_decklink_list_devices
int ff_decklink_list_devices(AVFormatContext *avctx)
Definition:
decklink_common.cpp:180
Generated on Mon Jun 27 2016 02:34:42 for FFmpeg by
1.8.6