[vlc-commits] videotoolbox: code style and indentation fixes
Marvin Scholz
git at videolan.org
Fri Jul 3 13:51:46 CEST 2020
vlc | branch: master | Marvin Scholz <epirat07 at gmail.com> | Fri Jul 3 03:18:22 2020 +0200| [537c15036516b57cc265c647cc0f8cb0c2cc314b] | committer: Marvin Scholz
videotoolbox: code style and indentation fixes
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=537c15036516b57cc265c647cc0f8cb0c2cc314b
---
modules/codec/videotoolbox.c | 176 +++++++++++++++++++++++--------------------
1 file changed, 94 insertions(+), 82 deletions(-)
diff --git a/modules/codec/videotoolbox.c b/modules/codec/videotoolbox.c
index 06f8bbfb10..be41cf32fe 100644
--- a/modules/codec/videotoolbox.c
+++ b/modules/codec/videotoolbox.c
@@ -196,7 +196,7 @@ static void GetxPSH264(uint8_t i_pps_id, void *priv,
decoder_sys_t *p_sys = priv;
*pp_pps = p_sys->hh.h264.pps_list[i_pps_id].h264_pps;
- if(*pp_pps == NULL)
+ if (*pp_pps == NULL)
*pp_sps = NULL;
else
*pp_sps = p_sys->hh.h264.sps_list[(*pp_pps)->i_sps_id].h264_sps;
@@ -210,19 +210,19 @@ struct sei_callback_h264_s
static bool ParseH264SEI(const hxxx_sei_data_t *p_sei_data, void *priv)
{
- if(p_sei_data->i_type == HXXX_SEI_PIC_TIMING)
+ if (p_sei_data->i_type == HXXX_SEI_PIC_TIMING)
{
struct sei_callback_h264_s *s = priv;
- if(s->p_sps && s->p_sps->vui.b_valid)
+ if (s->p_sps && s->p_sps->vui.b_valid)
{
- if(s->p_sps->vui.b_hrd_parameters_present_flag)
+ if (s->p_sps->vui.b_hrd_parameters_present_flag)
{
bs_read(p_sei_data->p_bs, s->p_sps->vui.i_cpb_removal_delay_length_minus1 + 1);
bs_read(p_sei_data->p_bs, s->p_sps->vui.i_dpb_output_delay_length_minus1 + 1);
}
- if(s->p_sps->vui.b_pic_struct_present_flag)
- s->i_pic_struct = bs_read( p_sei_data->p_bs, 4);
+ if (s->p_sps->vui.b_pic_struct_present_flag)
+ s->i_pic_struct = bs_read( p_sei_data->p_bs, 4);
}
return false;
}
@@ -245,9 +245,9 @@ static bool FillReorderInfoH264(decoder_t *p_dec, const block_t *p_block,
size_t i_nal;
} sei_array[VT_MAX_SEI_COUNT];
size_t i_sei_count = 0;
- while(hxxx_iterate_next(&itctx, &p_nal, &i_nal))
+ while (hxxx_iterate_next(&itctx, &p_nal, &i_nal))
{
- if(i_nal < 2)
+ if (i_nal < 2)
continue;
const enum h264_nal_unit_type_e i_nal_type = p_nal[0] & 0x1F;
@@ -255,13 +255,13 @@ static bool FillReorderInfoH264(decoder_t *p_dec, const block_t *p_block,
if (i_nal_type <= H264_NAL_SLICE_IDR && i_nal_type != H264_NAL_UNKNOWN)
{
h264_slice_t slice;
- if(!h264_decode_slice(p_nal, i_nal, GetxPSH264, p_sys, &slice))
+ if (!h264_decode_slice(p_nal, i_nal, GetxPSH264, p_sys, &slice))
return false;
const h264_sequence_parameter_set_t *p_sps;
const h264_picture_parameter_set_t *p_pps;
GetxPSH264(slice.i_pic_parameter_set_id, p_sys, &p_sps, &p_pps);
- if(p_sps)
+ if (p_sps)
{
int bFOC;
h264_compute_poc(p_sps, &slice, &p_sys->h264_pocctx,
@@ -277,20 +277,20 @@ static bool FillReorderInfoH264(decoder_t *p_dec, const block_t *p_block,
sei.p_sps = p_sps;
sei.i_pic_struct = UINT8_MAX;
- for(size_t i=0; i<i_sei_count; i++)
+ for (size_t i = 0; i < i_sei_count; i++)
HxxxParseSEI(sei_array[i].p_nal, sei_array[i].i_nal, 1,
ParseH264SEI, &sei);
p_info->i_num_ts = h264_get_num_ts(p_sps, &slice, sei.i_pic_struct,
p_info->i_foc, bFOC);
- if(!p_info->b_progressive)
+ if (!p_info->b_progressive)
p_info->b_top_field_first = (sei.i_pic_struct % 2 == 1);
/* Set frame rate for timings in case of missing rate */
- if( (!p_dec->fmt_in.video.i_frame_rate_base ||
- !p_dec->fmt_in.video.i_frame_rate) &&
- p_sps->vui.i_time_scale && p_sps->vui.i_num_units_in_tick )
+ if ( (!p_dec->fmt_in.video.i_frame_rate_base ||
+ !p_dec->fmt_in.video.i_frame_rate) &&
+ p_sps->vui.i_time_scale && p_sps->vui.i_num_units_in_tick )
{
date_Change( &p_sys->pts, p_sps->vui.i_time_scale,
p_sps->vui.i_num_units_in_tick );
@@ -313,9 +313,9 @@ static bool FillReorderInfoH264(decoder_t *p_dec, const block_t *p_block,
return true; /* No need to parse further NAL */
}
- else if(i_nal_type == H264_NAL_SEI)
+ else if (i_nal_type == H264_NAL_SEI)
{
- if(i_sei_count < VT_MAX_SEI_COUNT)
+ if (i_sei_count < VT_MAX_SEI_COUNT)
{
sei_array[i_sei_count].p_nal = p_nal;
sei_array[i_sei_count++].i_nal = i_nal;
@@ -435,7 +435,7 @@ static bool ConfigureVoutH264(decoder_t *p_dec)
{
decoder_sys_t *p_sys = p_dec->p_sys;
- if(p_dec->fmt_in.video.primaries == COLOR_PRIMARIES_UNDEF)
+ if (p_dec->fmt_in.video.primaries == COLOR_PRIMARIES_UNDEF)
{
video_color_primaries_t primaries;
video_transfer_func_t transfer;
@@ -457,7 +457,7 @@ static bool ConfigureVoutH264(decoder_t *p_dec)
if (!p_dec->fmt_in.video.i_visible_width || !p_dec->fmt_in.video.i_visible_height)
{
unsigned i_width, i_height, i_vis_width, i_vis_height;
- if(VLC_SUCCESS ==
+ if (VLC_SUCCESS ==
hxxx_helper_get_current_picture_size(&p_sys->hh,
&i_width, &i_height,
&i_vis_width, &i_vis_height))
@@ -470,7 +470,7 @@ static bool ConfigureVoutH264(decoder_t *p_dec)
else return false;
}
- if(!p_dec->fmt_in.video.i_sar_num || !p_dec->fmt_in.video.i_sar_den)
+ if (!p_dec->fmt_in.video.i_sar_num || !p_dec->fmt_in.video.i_sar_den)
{
int i_sar_num, i_sar_den;
if (VLC_SUCCESS ==
@@ -571,10 +571,10 @@ struct hevc_sei_callback_s
static bool ParseHEVCSEI(const hxxx_sei_data_t *p_sei_data, void *priv)
{
- if(p_sei_data->i_type == HXXX_SEI_PIC_TIMING)
+ if (p_sei_data->i_type == HXXX_SEI_PIC_TIMING)
{
struct hevc_sei_callback_s *s = priv;
- if(likely(s->p_sps))
+ if (likely(s->p_sps))
s->p_timing = hevc_decode_sei_pic_timing(p_sei_data->p_bs, s->p_sps);
return false;
}
@@ -599,7 +599,7 @@ static bool FillReorderInfoHEVC(decoder_t *p_dec, const block_t *p_block,
while(hxxx_iterate_next(&itctx, &p_nal, &i_nal))
{
- if(i_nal < 2 || hevc_getNALLayer(p_nal) > 0)
+ if (i_nal < 2 || hevc_getNALLayer(p_nal) > 0)
continue;
const enum hevc_nal_unit_type_e i_nal_type = hevc_getNALType(p_nal);
@@ -607,7 +607,7 @@ static bool FillReorderInfoHEVC(decoder_t *p_dec, const block_t *p_block,
{
hevc_slice_segment_header_t *p_sli =
hevc_decode_slice_header(p_nal, i_nal, true, GetxPSHEVC, p_sys);
- if(!p_sli)
+ if (!p_sli)
return false;
/* XXX: Work-around a VT bug on recent devices (iPhone X, MacBook
@@ -626,12 +626,14 @@ static bool FillReorderInfoHEVC(decoder_t *p_dec, const block_t *p_block,
return false;
}
else
+ {
p_sys->b_drop_blocks = false;
+ }
}
p_info->b_keyframe = i_nal_type >= HEVC_NAL_BLA_W_LP;
enum hevc_slice_type_e slice_type;
- if(hevc_get_slice_type(p_sli, &slice_type))
+ if (hevc_get_slice_type(p_sli, &slice_type))
{
p_info->b_keyframe |= (slice_type == HEVC_SLICE_TYPE_I);
}
@@ -640,7 +642,7 @@ static bool FillReorderInfoHEVC(decoder_t *p_dec, const block_t *p_block,
hevc_picture_parameter_set_t *p_pps;
hevc_video_parameter_set_t *p_vps;
GetxPSHEVC(hevc_get_slice_pps_id(p_sli), p_sys, &p_pps, &p_sps, &p_vps);
- if(p_sps)
+ if (p_sps)
{
struct hevc_sei_callback_s sei;
sei.p_sps = p_sps;
@@ -649,7 +651,7 @@ static bool FillReorderInfoHEVC(decoder_t *p_dec, const block_t *p_block,
const int POC = hevc_compute_picture_order_count(p_sps, p_sli,
&p_sys->hevc_pocctx);
- for(size_t i=0; i<i_sei_count; i++)
+ for (size_t i=0; i<i_sei_count; i++)
HxxxParseSEI(sei_array[i].p_nal, sei_array[i].i_nal,
2, ParseHEVCSEI, &sei);
@@ -661,18 +663,18 @@ static bool FillReorderInfoHEVC(decoder_t *p_dec, const block_t *p_block,
p_info->b_progressive = hevc_frame_is_progressive(p_sps, sei.p_timing);
/* Set frame rate for timings in case of missing rate */
- if( (!p_dec->fmt_in.video.i_frame_rate_base ||
+ if ( (!p_dec->fmt_in.video.i_frame_rate_base ||
!p_dec->fmt_in.video.i_frame_rate) )
{
unsigned num, den;
- if(hevc_get_frame_rate(p_sps, p_vps, &num, &den))
+ if (hevc_get_frame_rate(p_sps, p_vps, &num, &den))
date_Change(&p_sys->pts, num, den);
}
- if(sei.p_timing)
+ if (sei.p_timing)
hevc_release_sei_pic_timing(sei.p_timing);
- if(!p_sys->b_invalid_pic_reorder_max && p_vps)
+ if (!p_sys->b_invalid_pic_reorder_max && p_vps)
{
vlc_mutex_lock(&p_sys->lock);
p_sys->i_pic_reorder_max = hevc_get_max_num_reorder(p_vps);
@@ -687,9 +689,9 @@ static bool FillReorderInfoHEVC(decoder_t *p_dec, const block_t *p_block,
hevc_rbsp_release_slice_header(p_sli);
return true; /* No need to parse further NAL */
}
- else if(i_nal_type == HEVC_NAL_PREF_SEI)
+ else if (i_nal_type == HEVC_NAL_PREF_SEI)
{
- if(i_sei_count < VT_MAX_SEI_COUNT)
+ if (i_sei_count < VT_MAX_SEI_COUNT)
{
sei_array[i_sei_count].p_nal = p_nal;
sei_array[i_sei_count++].i_nal = i_nal;
@@ -764,17 +766,17 @@ static void InsertIntoDPB(decoder_sys_t *p_sys, frame_info_t *p_info)
{
frame_info_t **pp_lead_in = &p_sys->p_pic_reorder;
- for( ;; pp_lead_in = & ((*pp_lead_in)->p_next))
+ for ( ;; pp_lead_in = & ((*pp_lead_in)->p_next))
{
bool b_insert;
- if(*pp_lead_in == NULL)
+ if (*pp_lead_in == NULL)
b_insert = true;
- else if(p_sys->b_poc_based_reorder)
+ else if (p_sys->b_poc_based_reorder)
b_insert = ((*pp_lead_in)->i_foc > p_info->i_foc);
else
b_insert = ((*pp_lead_in)->p_picture->date >= p_info->p_picture->date);
- if(b_insert)
+ if (b_insert)
{
p_info->p_next = *pp_lead_in;
*pp_lead_in = p_info;
@@ -783,7 +785,7 @@ static void InsertIntoDPB(decoder_sys_t *p_sys, frame_info_t *p_info)
}
}
#if 0
- for(frame_info_t *p_in=p_sys->p_pic_reorder; p_in; p_in = p_in->p_next)
+ for (frame_info_t *p_in=p_sys->p_pic_reorder; p_in; p_in = p_in->p_next)
printf(" %d", p_in->i_foc);
printf("\n");
#endif
@@ -792,7 +794,7 @@ static void InsertIntoDPB(decoder_sys_t *p_sys, frame_info_t *p_info)
static picture_t * RemoveOneFrameFromDPB(decoder_sys_t *p_sys)
{
frame_info_t *p_info = p_sys->p_pic_reorder;
- if(p_info == NULL)
+ if (p_info == NULL)
return NULL;
const int i_framepoc = p_info->i_poc;
@@ -833,7 +835,10 @@ static picture_t * RemoveOneFrameFromDPB(decoder_sys_t *p_sys)
else
b_dequeue = (p_field->date == p_info->p_picture->date);
}
- else b_dequeue = false;
+ else
+ {
+ b_dequeue = false;
+ }
} while(b_dequeue);
@@ -843,7 +848,7 @@ static picture_t * RemoveOneFrameFromDPB(decoder_sys_t *p_sys)
static void DrainDPBLocked(decoder_t *p_dec, bool flush)
{
decoder_sys_t *p_sys = p_dec->p_sys;
- for( ;; )
+ for ( ;; )
{
picture_t *p_fields = RemoveOneFrameFromDPB(p_sys);
if (p_fields == NULL)
@@ -870,7 +875,7 @@ static frame_info_t * CreateReorderInfo(decoder_t *p_dec, const block_t *p_block
if (p_sys->pf_fill_reorder_info)
{
- if(!p_sys->pf_fill_reorder_info(p_dec, p_block, p_info))
+ if (!p_sys->pf_fill_reorder_info(p_dec, p_block, p_info))
{
free(p_info);
return NULL;
@@ -905,7 +910,7 @@ static void OnDecodedFrame(decoder_t *p_dec, frame_info_t *p_info)
if (p_sys->p_pic_reorder && !p_info->b_flush &&
p_sys->i_pic_reorder_max < H264_MAX_DPB)
{
- if(p_sys->b_poc_based_reorder && p_sys->p_pic_reorder->i_foc > p_info->i_foc)
+ if (p_sys->b_poc_based_reorder && p_sys->p_pic_reorder->i_foc > p_info->i_foc)
{
p_sys->b_invalid_pic_reorder_max = true;
p_sys->i_pic_reorder_max++;
@@ -1040,7 +1045,7 @@ static CFMutableDictionaryRef CreateSessionDescriptionFormat(decoder_t *p_dec,
CFDictionaryRef extradata = p_sys->pf_copy_extradata
? p_sys->pf_copy_extradata(p_dec) : NULL;
- if(extradata)
+ if (extradata)
{
/* then decoder will also fail if required, no need to handle it */
CFDictionarySetValue(decoderConfiguration,
@@ -1057,10 +1062,10 @@ static CFMutableDictionaryRef CreateSessionDescriptionFormat(decoder_t *p_dec,
kCVImageBufferChromaLocation_Left);
/* pixel aspect ratio */
- if(i_sar_num && i_sar_den)
+ if (i_sar_num && i_sar_den)
{
CFMutableDictionaryRef pixelaspectratio = cfdict_create(2);
- if(pixelaspectratio == NULL)
+ if (pixelaspectratio == NULL)
{
CFRelease(decoderConfiguration);
return NULL;
@@ -1121,12 +1126,15 @@ static void PtsInit(decoder_t *p_dec)
{
decoder_sys_t *p_sys = p_dec->p_sys;
- if( p_dec->fmt_in.video.i_frame_rate_base && p_dec->fmt_in.video.i_frame_rate )
+ if (p_dec->fmt_in.video.i_frame_rate_base && p_dec->fmt_in.video.i_frame_rate)
+ {
+ date_Init(&p_sys->pts, p_dec->fmt_in.video.i_frame_rate * 2,
+ p_dec->fmt_in.video.i_frame_rate_base);
+ }
+ else
{
- date_Init( &p_sys->pts, p_dec->fmt_in.video.i_frame_rate * 2,
- p_dec->fmt_in.video.i_frame_rate_base );
+ date_Init(&p_sys->pts, 2 * 30000, 1001);
}
- else date_Init( &p_sys->pts, 2 * 30000, 1001 );
}
static int StartVideoToolbox(decoder_t *p_dec)
@@ -1134,26 +1142,26 @@ static int StartVideoToolbox(decoder_t *p_dec)
decoder_sys_t *p_sys = p_dec->p_sys;
/* Late starts */
- if(p_sys->pf_late_start && p_sys->pf_late_start(p_dec))
+ if (p_sys->pf_late_start && p_sys->pf_late_start(p_dec))
{
assert(p_sys->session == NULL);
return VLC_SUCCESS;
}
/* Fills fmt_out (from extradata if any) */
- if(ConfigureVout(p_dec) != VLC_SUCCESS)
+ if (ConfigureVout(p_dec) != VLC_SUCCESS)
return VLC_EGENERIC;
/* destination pixel buffer attributes */
CFMutableDictionaryRef destinationPixelBufferAttributes = cfdict_create(0);
- if(destinationPixelBufferAttributes == NULL)
+ if (destinationPixelBufferAttributes == NULL)
return VLC_EGENERIC;
CFMutableDictionaryRef decoderConfiguration =
CreateSessionDescriptionFormat(p_dec,
p_dec->fmt_out.video.i_sar_num,
p_dec->fmt_out.video.i_sar_den);
- if(decoderConfiguration == NULL)
+ if (decoderConfiguration == NULL)
{
CFRelease(destinationPixelBufferAttributes);
return VLC_EGENERIC;
@@ -1241,7 +1249,7 @@ static void StopVideoToolbox(decoder_t *p_dec, bool closing)
* vout (and not released). To work-around this issue, we force a vout
* change. */
if (!closing && p_dec->fmt_out.i_codec == VLC_CODEC_CVPX_BGRA
- && p_dec->fmt_out.video.i_width * p_dec->fmt_out.video.i_height >= 8000000)
+ && p_dec->fmt_out.video.i_width * p_dec->fmt_out.video.i_height >= 8000000)
{
const video_format_t orig = p_dec->fmt_out.video;
p_dec->fmt_out.video.i_width = p_dec->fmt_out.video.i_height =
@@ -1325,7 +1333,7 @@ static void CloseDecoder(vlc_object_t *p_this)
StopVideoToolbox(p_dec, true);
- if(p_sys->pf_codec_clean)
+ if (p_sys->pf_codec_clean)
p_sys->pf_codec_clean(p_dec);
vlc_video_context_Release(p_sys->vctx);
@@ -1519,8 +1527,8 @@ static Boolean deviceSupportsAdvancedLevels()
static inline void bo_add_mp4_tag_descr(bo_t *p_bo, uint8_t tag, uint32_t size)
{
bo_add_8(p_bo, tag);
- for (int i = 3; i>0; i--)
- bo_add_8(p_bo, (size>>(7*i)) | 0x80);
+ for (int i = 3; i > 0; i--)
+ bo_add_8(p_bo, (size >> (7 * i)) | 0x80);
bo_add_8(p_bo, size & 0x7F);
}
@@ -1575,8 +1583,7 @@ static int ConfigureVout(decoder_t *p_dec)
/* return our proper VLC internal state */
p_dec->fmt_out.i_codec = 0;
- if(p_sys->pf_configure_vout &&
- !p_sys->pf_configure_vout(p_dec))
+ if (p_sys->pf_configure_vout && !p_sys->pf_configure_vout(p_dec))
return VLC_EGENERIC;
if (!p_dec->fmt_out.video.i_visible_width || !p_dec->fmt_out.video.i_visible_height)
@@ -1621,7 +1628,7 @@ static CMSampleBufferRef VTSampleBufferCreate(decoder_t *p_dec,
CMBlockBufferRef block_buf = NULL;
CMSampleBufferRef sample_buf = NULL;
CMTime pts;
- if(!p_sys->b_poc_based_reorder && p_block->i_pts == VLC_TICK_INVALID)
+ if (!p_sys->b_poc_based_reorder && p_block->i_pts == VLC_TICK_INVALID)
pts = CMTimeMake(p_block->i_dts, CLOCK_FREQ);
else
pts = CMTimeMake(p_block->i_pts, CLOCK_FREQ);
@@ -1796,8 +1803,8 @@ static int DecodeBlock(decoder_t *p_dec, block_t *p_block)
"aborting...");
p_sys->vtsession_status = VTSESSION_STATUS_ABORT;
#else
- if (!p_sys->b_cvpx_format_forced
- && p_sys->i_cvpx_format == kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange)
+ if (!p_sys->b_cvpx_format_forced &&
+ p_sys->i_cvpx_format == kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange)
{
/* In case of interlaced content, force VT to output I420 since our
* SW deinterlacer handle this chroma natively. This avoids having
@@ -1839,7 +1846,9 @@ static int DecodeBlock(decoder_t *p_dec, block_t *p_block)
}
}
else
+ {
do_restart = p_sys->i_restart_count <= VT_RESTART_MAX;
+ }
if (do_restart)
{
@@ -1882,7 +1891,7 @@ static int DecodeBlock(decoder_t *p_dec, block_t *p_block)
}
bool b_config_changed = false;
- if(p_sys->pf_process_block)
+ if (p_sys->pf_process_block)
{
p_block = p_sys->pf_process_block(p_dec, p_block, &b_config_changed);
if (!p_block)
@@ -1890,7 +1899,7 @@ static int DecodeBlock(decoder_t *p_dec, block_t *p_block)
}
frame_info_t *p_info = CreateReorderInfo(p_dec, p_block);
- if(unlikely(!p_info))
+ if (unlikely(!p_info))
goto skip;
if (!p_sys->session /* Late Start */||
@@ -1906,7 +1915,7 @@ static int DecodeBlock(decoder_t *p_dec, block_t *p_block)
StopVideoToolbox(p_dec, false);
}
- if(!p_sys->session)
+ if (!p_sys->session)
{
if ((p_sys->pf_codec_supported && !p_sys->pf_codec_supported(p_dec))
|| StartVideoToolbox(p_dec) != VLC_SUCCESS)
@@ -1950,7 +1959,7 @@ static int DecodeBlock(decoder_t *p_dec, block_t *p_block)
if (HandleVTStatus(p_dec, status, &vtsession_status) == VLC_SUCCESS)
{
p_sys->b_vt_feed = true;
- if( p_block->i_flags & BLOCK_FLAG_END_OF_SEQUENCE )
+ if (p_block->i_flags & BLOCK_FLAG_END_OF_SEQUENCE)
Drain( p_dec, false );
}
else
@@ -2154,7 +2163,7 @@ static void DecoderCallback(void *decompressionOutputRefCon,
if (CVPixelBufferGetDataSize(imageBuffer) == 0)
goto end;
- if(likely(p_info))
+ if (likely(p_info))
{
/* Unlock the mutex because decoder_NewPicture() is blocking. Indeed,
* it can wait indefinitely when the input is paused. */
@@ -2174,7 +2183,7 @@ static void DecoderCallback(void *decompressionOutputRefCon,
p_pic->b_force = p_info->b_eos;
p_pic->b_still = p_info->b_eos;
p_pic->b_progressive = p_info->b_progressive;
- if(!p_pic->b_progressive)
+ if (!p_pic->b_progressive)
{
p_pic->i_nb_fields = p_info->i_num_ts;
p_pic->b_top_field_first = p_info->b_top_field_first;
@@ -2258,17 +2267,20 @@ static const char *const chroma_list_names[] =
};
vlc_module_begin()
-set_category(CAT_INPUT)
-set_subcategory(SUBCAT_INPUT_VCODEC)
-set_description(N_("VideoToolbox video decoder"))
-set_capability("video decoder",800)
-set_callbacks(OpenDecoder, CloseDecoder)
-
-add_obsolete_bool("videotoolbox-temporal-deinterlacing")
-add_obsolete_bool("videotoolbox")
-add_bool("videotoolbox-hw-decoder-only", true, VT_REQUIRE_HW_DEC, VT_REQUIRE_HW_DEC, false)
-add_string("videotoolbox-cvpx-chroma", "", VT_FORCE_CVPX_CHROMA, VT_FORCE_CVPX_CHROMA_LONG, true);
- change_string_list(chroma_list_values, chroma_list_names)
-add_submodule ()
- set_callback_dec_device(OpenDecDevice, 1)
+ set_category(CAT_INPUT)
+ set_subcategory(SUBCAT_INPUT_VCODEC)
+ set_description(N_("VideoToolbox video decoder"))
+ set_capability("video decoder", 800)
+ set_callbacks(OpenDecoder, CloseDecoder)
+
+ add_bool("videotoolbox-hw-decoder-only", true, VT_REQUIRE_HW_DEC, VT_REQUIRE_HW_DEC, false)
+ add_string("videotoolbox-cvpx-chroma", "", VT_FORCE_CVPX_CHROMA, VT_FORCE_CVPX_CHROMA_LONG, true);
+ change_string_list(chroma_list_values, chroma_list_names)
+
+ /* Deprecated options */
+ add_obsolete_bool("videotoolbox-temporal-deinterlacing") // Since 4.0.0
+ add_obsolete_bool("videotoolbox") // Since 4.0.0
+
+ add_submodule()
+ set_callback_dec_device(OpenDecDevice, 1)
vlc_module_end()
More information about the vlc-commits
mailing list