You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-11-23 21:54:53 +02:00
avdevice/decklink_dec: remove the @mode syntax
Deprecated since March 28, 2017. Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
@@ -200,7 +200,7 @@ int ff_decklink_set_format(AVFormatContext *avctx,
|
|||||||
int width, int height,
|
int width, int height,
|
||||||
int tb_num, int tb_den,
|
int tb_num, int tb_den,
|
||||||
enum AVFieldOrder field_order,
|
enum AVFieldOrder field_order,
|
||||||
decklink_direction_t direction, int num)
|
decklink_direction_t direction)
|
||||||
{
|
{
|
||||||
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;
|
||||||
@@ -214,8 +214,8 @@ int ff_decklink_set_format(AVFormatContext *avctx,
|
|||||||
int i = 1;
|
int i = 1;
|
||||||
HRESULT res;
|
HRESULT res;
|
||||||
|
|
||||||
av_log(avctx, AV_LOG_DEBUG, "Trying to find mode for frame size %dx%d, frame timing %d/%d, field order %d, direction %d, mode number %d, format code %s\n",
|
av_log(avctx, AV_LOG_DEBUG, "Trying to find mode for frame size %dx%d, frame timing %d/%d, field order %d, direction %d, format code %s\n",
|
||||||
width, height, tb_num, tb_den, field_order, direction, num, (cctx->format_code) ? cctx->format_code : "(unset)");
|
width, height, tb_num, tb_den, field_order, direction, cctx->format_code ? cctx->format_code : "(unset)");
|
||||||
|
|
||||||
if (direction == DIRECTION_IN) {
|
if (direction == DIRECTION_IN) {
|
||||||
res = ctx->dli->GetDisplayModeIterator (&itermode);
|
res = ctx->dli->GetDisplayModeIterator (&itermode);
|
||||||
@@ -248,7 +248,6 @@ int ff_decklink_set_format(AVFormatContext *avctx,
|
|||||||
bmd_height == height &&
|
bmd_height == height &&
|
||||||
!av_cmp_q(mode_tb, target_tb) &&
|
!av_cmp_q(mode_tb, target_tb) &&
|
||||||
field_order_eq(field_order, bmd_field_dominance))
|
field_order_eq(field_order, bmd_field_dominance))
|
||||||
|| i == num
|
|
||||||
|| target_mode == bmd_mode) {
|
|| target_mode == bmd_mode) {
|
||||||
ctx->bmd_mode = bmd_mode;
|
ctx->bmd_mode = bmd_mode;
|
||||||
ctx->bmd_width = bmd_width;
|
ctx->bmd_width = bmd_width;
|
||||||
@@ -314,8 +313,8 @@ int ff_decklink_set_format(AVFormatContext *avctx,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ff_decklink_set_format(AVFormatContext *avctx, decklink_direction_t direction, int num) {
|
int ff_decklink_set_format(AVFormatContext *avctx, decklink_direction_t direction) {
|
||||||
return ff_decklink_set_format(avctx, 0, 0, 0, 0, AV_FIELD_UNKNOWN, direction, num);
|
return ff_decklink_set_format(avctx, 0, 0, 0, 0, AV_FIELD_UNKNOWN, direction);
|
||||||
}
|
}
|
||||||
|
|
||||||
int ff_decklink_list_devices(AVFormatContext *avctx,
|
int ff_decklink_list_devices(AVFormatContext *avctx,
|
||||||
|
|||||||
@@ -197,8 +197,8 @@ static const BMDTimecodeFormat decklink_timecode_format_map[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
int ff_decklink_set_configs(AVFormatContext *avctx, decklink_direction_t direction);
|
int ff_decklink_set_configs(AVFormatContext *avctx, decklink_direction_t direction);
|
||||||
int ff_decklink_set_format(AVFormatContext *avctx, int width, int height, int tb_num, int tb_den, enum AVFieldOrder field_order, decklink_direction_t direction = DIRECTION_OUT, int num = 0);
|
int ff_decklink_set_format(AVFormatContext *avctx, int width, int height, int tb_num, int tb_den, enum AVFieldOrder field_order, decklink_direction_t direction = DIRECTION_OUT);
|
||||||
int ff_decklink_set_format(AVFormatContext *avctx, decklink_direction_t direction, int num);
|
int ff_decklink_set_format(AVFormatContext *avctx, decklink_direction_t direction);
|
||||||
int ff_decklink_list_devices(AVFormatContext *avctx, struct AVDeviceInfoList *device_list, int show_inputs, int show_outputs);
|
int ff_decklink_list_devices(AVFormatContext *avctx, struct AVDeviceInfoList *device_list, int show_inputs, int show_outputs);
|
||||||
void ff_decklink_list_devices_legacy(AVFormatContext *avctx, int show_inputs, int show_outputs);
|
void ff_decklink_list_devices_legacy(AVFormatContext *avctx, int show_inputs, int show_outputs);
|
||||||
int ff_decklink_list_formats(AVFormatContext *avctx, decklink_direction_t direction = DIRECTION_OUT);
|
int ff_decklink_list_formats(AVFormatContext *avctx, decklink_direction_t direction = DIRECTION_OUT);
|
||||||
|
|||||||
@@ -1005,9 +1005,6 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx)
|
|||||||
class decklink_input_callback *input_callback;
|
class decklink_input_callback *input_callback;
|
||||||
AVStream *st;
|
AVStream *st;
|
||||||
HRESULT result;
|
HRESULT result;
|
||||||
char fname[1024];
|
|
||||||
char *tmp;
|
|
||||||
int mode_num = 0;
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ctx = (struct decklink_ctx *) av_mallocz(sizeof(struct decklink_ctx));
|
ctx = (struct decklink_ctx *) av_mallocz(sizeof(struct decklink_ctx));
|
||||||
@@ -1062,15 +1059,7 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx)
|
|||||||
cctx->raw_format = MKBETAG('v','2','1','0');
|
cctx->raw_format = MKBETAG('v','2','1','0');
|
||||||
}
|
}
|
||||||
|
|
||||||
av_strlcpy(fname, avctx->url, sizeof(fname));
|
ret = ff_decklink_init_device(avctx, avctx->url);
|
||||||
tmp=strchr (fname, '@');
|
|
||||||
if (tmp != NULL) {
|
|
||||||
av_log(avctx, AV_LOG_WARNING, "The @mode syntax is deprecated and will be removed. Please use the -format_code option.\n");
|
|
||||||
mode_num = atoi (tmp+1);
|
|
||||||
*tmp = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = ff_decklink_init_device(avctx, fname);
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
@@ -1111,7 +1100,7 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx)
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mode_num == 0 && !cctx->format_code) {
|
if (!cctx->format_code) {
|
||||||
if (decklink_autodetect(cctx) < 0) {
|
if (decklink_autodetect(cctx) < 0) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "Cannot Autodetect input stream or No signal\n");
|
av_log(avctx, AV_LOG_ERROR, "Cannot Autodetect input stream or No signal\n");
|
||||||
ret = AVERROR(EIO);
|
ret = AVERROR(EIO);
|
||||||
@@ -1119,9 +1108,9 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx)
|
|||||||
}
|
}
|
||||||
av_log(avctx, AV_LOG_INFO, "Autodetected the input mode\n");
|
av_log(avctx, AV_LOG_INFO, "Autodetected the input mode\n");
|
||||||
}
|
}
|
||||||
if (ff_decklink_set_format(avctx, DIRECTION_IN, mode_num) < 0) {
|
if (ff_decklink_set_format(avctx, DIRECTION_IN) < 0) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "Could not set mode number %d or format code %s for %s\n",
|
av_log(avctx, AV_LOG_ERROR, "Could not set format code %s for %s\n",
|
||||||
mode_num, (cctx->format_code) ? cctx->format_code : "(unset)", fname);
|
cctx->format_code ? cctx->format_code : "(unset)", avctx->url);
|
||||||
ret = AVERROR(EIO);
|
ret = AVERROR(EIO);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user