[FFmpeg-devel] [PATCH 2/2] avdevice/decklink: addition of absolute wallclock option for pts source
Dixit, Vishwanath
vdixit at akamai.com
Wed Jan 10 06:58:46 EET 2018
On 1/9/18 3:22 AM, Moritz Barsnick wrote:
> On Mon, Jan 08, 2018 at 10:56:56 +0530, vdixit at akamai.com wrote:
>
>> - { "audio_pts", "audio pts source", OFFSET(audio_pts_source), AV_OPT_TYPE_INT, { .i64 = PTS_SRC_AUDIO }, 1, 4, DEC, "pts_source"},
>> - { "video_pts", "video pts source", OFFSET(video_pts_source), AV_OPT_TYPE_INT, { .i64 = PTS_SRC_VIDEO }, 1, 4, DEC, "pts_source"},
>> + { "audio_pts", "audio pts source", OFFSET(audio_pts_source), AV_OPT_TYPE_INT, { .i64 = PTS_SRC_AUDIO }, 1, 5, DEC, "pts_source"},
>> + { "video_pts", "video pts source", OFFSET(video_pts_source), AV_OPT_TYPE_INT, { .i64 = PTS_SRC_VIDEO }, 1, 5, DEC, "pts_source"},
>
> This cries for a max macro:
>
> PTS_SRC_VIDEO = 2,
> PTS_SRC_REFERENCE = 3,
> PTS_SRC_WALLCLOCK = 4,
> + PTS_SRC_ABS_WALLCLOCK = 5,
> + PTS_SRC_NB
> } DecklinkPtsSource;
>
> and then
>
> + { "audio_pts", "audio pts source", OFFSET(audio_pts_source), AV_OPT_TYPE_INT, { .i64 = PTS_SRC_AUDIO }, 1, PTS_SRC_NB-1, DEC, "pts_source"},
> + { "video_pts", "video pts source", OFFSET(video_pts_source), AV_OPT_TYPE_INT, { .i64 = PTS_SRC_VIDEO }, 1, PTS_SRC_NB-1, DEC, "pts_source"},
>
>> break;
>> case PTS_SRC_WALLCLOCK:
>> + case PTS_SRC_ABS_WALLCLOCK:
>
> Coverty and similar tools like fall-throughs to be marked as such to
> avoid false warnings.
>
>> + else if(ctx->audio_pts_source == PTS_SRC_ABS_WALLCLOCK || ctx->video_pts_source == PTS_SRC_ABS_WALLCLOCK)
>
> "else if ("
>
> Moritz
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Thanks for your review comments. I have made the suggested changes and have submitted the revised patch set with version v2. https://patchwork.ffmpeg.org/patch/7243/, https://patchwork.ffmpeg.org/patch/7242/, https://patchwork.ffmpeg.org/patch/7244/
More information about the ffmpeg-devel
mailing list