Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 1/2] ffmpeg_demux: show fixed timestamps in ts_fixup
@ 2023-02-06  1:22 Stefano Sabatini
  2023-02-11  0:12 ` Stefano Sabatini
  0 siblings, 1 reply; 3+ messages in thread
From: Stefano Sabatini @ 2023-02-06  1:22 UTC (permalink / raw)
  To: FFmpeg development discussions and patches; +Cc: Stefano Sabatini

Help debugging.
---
 fftools/ffmpeg_demux.c | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c
index 4b5c62b0d5..71ce7d9a02 100644
--- a/fftools/ffmpeg_demux.c
+++ b/fftools/ffmpeg_demux.c
@@ -173,16 +173,19 @@ static void ts_fixup(Demuxer *d, AVPacket *pkt, int *repeat_pict)
     const int64_t start_time = ifile->start_time_effective;
     int64_t duration;
 
-    if (debug_ts) {
-        av_log(NULL, AV_LOG_INFO, "demuxer -> ist_index:%d:%d type:%s "
-               "pkt_pts:%s pkt_pts_time:%s pkt_dts:%s pkt_dts_time:%s duration:%s duration_time:%s\n",
-               ifile->index, pkt->stream_index,
-               av_get_media_type_string(ist->st->codecpar->codec_type),
-               av_ts2str(pkt->pts), av_ts2timestr(pkt->pts, &ist->st->time_base),
-               av_ts2str(pkt->dts), av_ts2timestr(pkt->dts, &ist->st->time_base),
-               av_ts2str(pkt->duration), av_ts2timestr(pkt->duration, &ist->st->time_base));
+#define SHOW_TS_DEBUG(tag_)                                             \
+    if (debug_ts) {                                                     \
+        av_log(NULL, AV_LOG_INFO, "%s -> ist_index:%d:%d type:%s "      \
+               "pkt_pts:%s pkt_pts_time:%s pkt_dts:%s pkt_dts_time:%s duration:%s duration_time:%s\n", \
+               tag_, ifile->index, pkt->stream_index,                   \
+               av_get_media_type_string(ist->st->codecpar->codec_type), \
+               av_ts2str(pkt->pts), av_ts2timestr(pkt->pts, &ist->st->time_base), \
+               av_ts2str(pkt->dts), av_ts2timestr(pkt->dts, &ist->st->time_base), \
+               av_ts2str(pkt->duration), av_ts2timestr(pkt->duration, &ist->st->time_base)); \
     }
 
+    SHOW_TS_DEBUG("demuxer");
+
     if (!ist->wrap_correction_done && start_time != AV_NOPTS_VALUE &&
         ist->st->pts_wrap_bits < 64) {
         int64_t stime, stime2;
@@ -225,6 +228,8 @@ static void ts_fixup(Demuxer *d, AVPacket *pkt, int *repeat_pict)
     if (ist->st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO &&
         av_stream_get_parser(ist->st))
         *repeat_pict = av_stream_get_parser(ist->st)->repeat_pict;
+
+    SHOW_TS_DEBUG("demuxer+tsfixup");
 }
 
 static void thread_set_name(InputFile *f)
-- 
2.25.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [FFmpeg-devel] [PATCH 1/2] ffmpeg_demux: show fixed timestamps in ts_fixup
  2023-02-06  1:22 [FFmpeg-devel] [PATCH 1/2] ffmpeg_demux: show fixed timestamps in ts_fixup Stefano Sabatini
@ 2023-02-11  0:12 ` Stefano Sabatini
  2023-02-28 21:33   ` Stefano Sabatini
  0 siblings, 1 reply; 3+ messages in thread
From: Stefano Sabatini @ 2023-02-11  0:12 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

On date Monday 2023-02-06 02:22:24 +0100, Stefano Sabatini wrote:
> Help debugging.
> ---
>  fftools/ffmpeg_demux.c | 21 +++++++++++++--------
>  1 file changed, 13 insertions(+), 8 deletions(-)

Will apply in a few days.

BTW are categories exposed through the CLI (for example to only enable
debug logs for a given category)?

> diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c
> index 4b5c62b0d5..71ce7d9a02 100644
> --- a/fftools/ffmpeg_demux.c
> +++ b/fftools/ffmpeg_demux.c
> @@ -173,16 +173,19 @@ static void ts_fixup(Demuxer *d, AVPacket *pkt, int *repeat_pict)
>      const int64_t start_time = ifile->start_time_effective;
>      int64_t duration;
>  
> -    if (debug_ts) {
> -        av_log(NULL, AV_LOG_INFO, "demuxer -> ist_index:%d:%d type:%s "
> -               "pkt_pts:%s pkt_pts_time:%s pkt_dts:%s pkt_dts_time:%s duration:%s duration_time:%s\n",
> -               ifile->index, pkt->stream_index,
> -               av_get_media_type_string(ist->st->codecpar->codec_type),
> -               av_ts2str(pkt->pts), av_ts2timestr(pkt->pts, &ist->st->time_base),
> -               av_ts2str(pkt->dts), av_ts2timestr(pkt->dts, &ist->st->time_base),
> -               av_ts2str(pkt->duration), av_ts2timestr(pkt->duration, &ist->st->time_base));
> +#define SHOW_TS_DEBUG(tag_)                                             \
> +    if (debug_ts) {                                                     \
> +        av_log(NULL, AV_LOG_INFO, "%s -> ist_index:%d:%d type:%s "      \
> +               "pkt_pts:%s pkt_pts_time:%s pkt_dts:%s pkt_dts_time:%s duration:%s duration_time:%s\n", \
> +               tag_, ifile->index, pkt->stream_index,                   \
> +               av_get_media_type_string(ist->st->codecpar->codec_type), \
> +               av_ts2str(pkt->pts), av_ts2timestr(pkt->pts, &ist->st->time_base), \
> +               av_ts2str(pkt->dts), av_ts2timestr(pkt->dts, &ist->st->time_base), \
> +               av_ts2str(pkt->duration), av_ts2timestr(pkt->duration, &ist->st->time_base)); \
>      }
>  
> +    SHOW_TS_DEBUG("demuxer");
> +
>      if (!ist->wrap_correction_done && start_time != AV_NOPTS_VALUE &&
>          ist->st->pts_wrap_bits < 64) {
>          int64_t stime, stime2;
> @@ -225,6 +228,8 @@ static void ts_fixup(Demuxer *d, AVPacket *pkt, int *repeat_pict)
>      if (ist->st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO &&
>          av_stream_get_parser(ist->st))
>          *repeat_pict = av_stream_get_parser(ist->st)->repeat_pict;
> +
> +    SHOW_TS_DEBUG("demuxer+tsfixup");
>  }
>  
>  static void thread_set_name(InputFile *f)
> -- 
> 2.25.1
> 
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [FFmpeg-devel] [PATCH 1/2] ffmpeg_demux: show fixed timestamps in ts_fixup
  2023-02-11  0:12 ` Stefano Sabatini
@ 2023-02-28 21:33   ` Stefano Sabatini
  0 siblings, 0 replies; 3+ messages in thread
From: Stefano Sabatini @ 2023-02-28 21:33 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

On date Saturday 2023-02-11 01:12:18 +0100, Stefano Sabatini wrote:
> On date Monday 2023-02-06 02:22:24 +0100, Stefano Sabatini wrote:
> > Help debugging.
> > ---
> >  fftools/ffmpeg_demux.c | 21 +++++++++++++--------
> >  1 file changed, 13 insertions(+), 8 deletions(-)
> 
> Will apply in a few days.
> 
> BTW are categories exposed through the CLI (for example to only enable
> debug logs for a given category)?

Applied.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-02-28 21:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-06  1:22 [FFmpeg-devel] [PATCH 1/2] ffmpeg_demux: show fixed timestamps in ts_fixup Stefano Sabatini
2023-02-11  0:12 ` Stefano Sabatini
2023-02-28 21:33   ` Stefano Sabatini

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git