mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-23 04:20:17 +00:00
decklink2: Fix caps to mode conversion
Build format list with custom mode preserved, instead of real mode
This commit is contained in:
parent
7c4cae61b9
commit
fecb91a0a7
1 changed files with 26 additions and 0 deletions
|
@ -1054,9 +1054,26 @@ gst_decklink2_build_template_caps (GstObject * io_object,
|
||||||
/* Add custom wide mode */
|
/* Add custom wide mode */
|
||||||
switch (bdm_mode) {
|
switch (bdm_mode) {
|
||||||
case bmdModeNTSC:
|
case bmdModeNTSC:
|
||||||
|
gst_mode_wide = gst_mode;
|
||||||
|
gst_mode_wide.mode = bmdModeNTSC_W;
|
||||||
|
gst_mode_wide.par_n = 40;
|
||||||
|
gst_mode_wide.par_d = 33;
|
||||||
|
s_wide = gst_structure_copy (s);
|
||||||
|
gst_structure_set (s_wide,
|
||||||
|
"pixel-aspect-ratio", GST_TYPE_FRACTION, 40, 33, NULL);
|
||||||
|
break;
|
||||||
case bmdModeNTSC2398:
|
case bmdModeNTSC2398:
|
||||||
|
gst_mode_wide = gst_mode;
|
||||||
|
gst_mode_wide.mode = bmdModeNTSC2398_W;
|
||||||
|
gst_mode_wide.par_n = 40;
|
||||||
|
gst_mode_wide.par_d = 33;
|
||||||
|
s_wide = gst_structure_copy (s);
|
||||||
|
gst_structure_set (s_wide,
|
||||||
|
"pixel-aspect-ratio", GST_TYPE_FRACTION, 40, 33, NULL);
|
||||||
|
break;
|
||||||
case bmdModeNTSCp:
|
case bmdModeNTSCp:
|
||||||
gst_mode_wide = gst_mode;
|
gst_mode_wide = gst_mode;
|
||||||
|
gst_mode_wide.mode = bmdModeNTSCp_W;
|
||||||
gst_mode_wide.par_n = 40;
|
gst_mode_wide.par_n = 40;
|
||||||
gst_mode_wide.par_d = 33;
|
gst_mode_wide.par_d = 33;
|
||||||
s_wide = gst_structure_copy (s);
|
s_wide = gst_structure_copy (s);
|
||||||
|
@ -1064,8 +1081,17 @@ gst_decklink2_build_template_caps (GstObject * io_object,
|
||||||
"pixel-aspect-ratio", GST_TYPE_FRACTION, 40, 33, NULL);
|
"pixel-aspect-ratio", GST_TYPE_FRACTION, 40, 33, NULL);
|
||||||
break;
|
break;
|
||||||
case bmdModePAL:
|
case bmdModePAL:
|
||||||
|
gst_mode_wide = gst_mode;
|
||||||
|
gst_mode_wide.mode = bmdModePAL_W;
|
||||||
|
gst_mode_wide.par_n = 16;
|
||||||
|
gst_mode_wide.par_d = 11;
|
||||||
|
s_wide = gst_structure_copy (s);
|
||||||
|
gst_structure_set (s_wide,
|
||||||
|
"pixel-aspect-ratio", GST_TYPE_FRACTION, 16, 11, NULL);
|
||||||
|
break;
|
||||||
case bmdModePALp:
|
case bmdModePALp:
|
||||||
gst_mode_wide = gst_mode;
|
gst_mode_wide = gst_mode;
|
||||||
|
gst_mode_wide.mode = bmdModePALp_W;
|
||||||
gst_mode_wide.par_n = 16;
|
gst_mode_wide.par_n = 16;
|
||||||
gst_mode_wide.par_d = 11;
|
gst_mode_wide.par_d = 11;
|
||||||
s_wide = gst_structure_copy (s);
|
s_wide = gst_structure_copy (s);
|
||||||
|
|
Loading…
Reference in a new issue