Feat: ffmpeg_plugin expose and wire PTP AVOptions in libavdevice path - #1665
Feat: ffmpeg_plugin expose and wire PTP AVOptions in libavdevice path#1665dmkarthi wants to merge 2 commits into
Conversation
DawidWesierski4
left a comment
There was a problem hiding this comment.
I think we should remove the ptp_sync_notify
Logging in itself is done via MTL ?
If there is a reson for it then it's diffrent story alltogether ?
| /* Logged every time the built-in PTP client receives a valid PTP_DELAY_RESP | ||
| * from the grandmaster (only fires when MTL_FLAG_PTP_ENABLE is set). priv is | ||
| * the AVFormatContext passed as mtl_init_params.priv below. */ | ||
| static void mtl_ptp_sync_notify_cb(void* priv, struct mtl_ptp_sync_notify_meta* meta) { | ||
| AVFormatContext* ctx = (AVFormatContext*)priv; | ||
| info(ctx, "%s, PTP sync: master_utc_offset=%d delta=%" PRId64 "ns\n", __func__, | ||
| meta->master_utc_offset, meta->delta); | ||
| } |
There was a problem hiding this comment.
i don't think there is a point of using this just to log a message?
The MTL has logging for PTP ? Is there a reson for it to be here ?
There was a problem hiding this comment.
We found that the same log is present in mt_ptp.c at line number 1505, will remove the callback function.
There was a problem hiding this comment.
looks like this part is already taken care in PR #1677
|
Hi i wanted to add some testing and other functionality so i cherry picked your changes into my branch i preserved the auther and plan to rebase the chagne so the change will have your name on it but i changed them tad bit so it passes our doc/coding-standard.md please review it, and don't hesitate to be brutal about feedback |
Summary
This PR adds libavdevice-level PTP option wiring in FFmpeg plugin initialization so users can control built-in MTL PTP behavior from AVOptions.
Changes
Updated
ecosystem/ffmpeg_plugin/mtl_common.hptp_enableptp_piptp_unicastStDevArgswith corresponding fields.Updated
ecosystem/ffmpeg_plugin/mtl_common.cptp_enableis set:MTL_FLAG_PTP_ENABLEST21_TX_PACING_WAY_PTPMTL_FLAG_PTP_PIandMTL_FLAG_PTP_UNICAST_ADDRptp_sync_notifycallback and logs sync metadata.Files changed:
ecosystem/ffmpeg_plugin/mtl_common.hecosystem/ffmpeg_plugin/mtl_common.c