mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-28 12:32:17 +02:00
avdevice/decklink_enc: simplify usage of buffercount type
Also remove some leftover declaration of CreateDeckLinkIteratorInstance(). Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
ff373bb4a8
commit
acaf6c625b
@ -155,13 +155,6 @@ struct decklink_ctx {
|
|||||||
|
|
||||||
typedef enum { DIRECTION_IN, DIRECTION_OUT} decklink_direction_t;
|
typedef enum { DIRECTION_IN, DIRECTION_OUT} decklink_direction_t;
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
typedef unsigned int buffercount_type;
|
|
||||||
IDeckLinkIterator *CreateDeckLinkIteratorInstance(void);
|
|
||||||
#else
|
|
||||||
typedef uint32_t buffercount_type;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static const BMDPixelFormat decklink_raw_format_map[] = {
|
static const BMDPixelFormat decklink_raw_format_map[] = {
|
||||||
(BMDPixelFormat)0,
|
(BMDPixelFormat)0,
|
||||||
bmdFormat8BitYUV,
|
bmdFormat8BitYUV,
|
||||||
|
@ -436,7 +436,7 @@ static int decklink_write_video_packet(AVFormatContext *avctx, AVPacket *pkt)
|
|||||||
AVFrame *avframe = NULL, *tmp = (AVFrame *)pkt->data;
|
AVFrame *avframe = NULL, *tmp = (AVFrame *)pkt->data;
|
||||||
AVPacket *avpacket = NULL;
|
AVPacket *avpacket = NULL;
|
||||||
decklink_frame *frame;
|
decklink_frame *frame;
|
||||||
buffercount_type buffered;
|
uint32_t buffered;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
if (st->codecpar->codec_id == AV_CODEC_ID_WRAPPED_AVFRAME) {
|
if (st->codecpar->codec_id == AV_CODEC_ID_WRAPPED_AVFRAME) {
|
||||||
@ -525,7 +525,7 @@ static int decklink_write_audio_packet(AVFormatContext *avctx, AVPacket *pkt)
|
|||||||
struct decklink_cctx *cctx = (struct decklink_cctx *)avctx->priv_data;
|
struct decklink_cctx *cctx = (struct decklink_cctx *)avctx->priv_data;
|
||||||
struct decklink_ctx *ctx = (struct decklink_ctx *)cctx->ctx;
|
struct decklink_ctx *ctx = (struct decklink_ctx *)cctx->ctx;
|
||||||
int sample_count = pkt->size / (ctx->channels << 1);
|
int sample_count = pkt->size / (ctx->channels << 1);
|
||||||
buffercount_type buffered;
|
uint32_t buffered;
|
||||||
|
|
||||||
ctx->dlo->GetBufferedAudioSampleFrameCount(&buffered);
|
ctx->dlo->GetBufferedAudioSampleFrameCount(&buffered);
|
||||||
if (pkt->pts > 1 && !buffered)
|
if (pkt->pts > 1 && !buffered)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user