Re: [FFmpeg-devel] [PATCH 1/1] ensure closed caption info which is visible in default stream dump is also available in results when -show_streams is used

2020-05-01 Thread Marton Balint



On Wed, 29 Apr 2020, vectronic wrote:


Signed-off-by: vectronic 
---
doc/ffprobe.xsd   | 1 +
fftools/ffprobe.c | 2 ++
tests/ref/fate/concat-demuxer-extended-lavf-mxf   | 2 +-
tests/ref/fate/concat-demuxer-extended-lavf-mxf_d10   | 2 +-
tests/ref/fate/concat-demuxer-simple1-lavf-mxf| 2 +-
tests/ref/fate/concat-demuxer-simple1-lavf-mxf_d10| 2 +-
tests/ref/fate/concat-demuxer-simple2-lavf-ts | 2 +-
tests/ref/fate/ffprobe_compact| 4 ++--
tests/ref/fate/ffprobe_csv| 4 ++--
tests/ref/fate/ffprobe_default| 2 ++
tests/ref/fate/ffprobe_flat   | 2 ++
tests/ref/fate/ffprobe_ini| 2 ++
tests/ref/fate/ffprobe_json   | 2 ++
tests/ref/fate/ffprobe_xml| 4 ++--
tests/ref/fate/hapqa-extract-nosnappy-to-hapalphaonly-mov | 1 +
tests/ref/fate/hapqa-extract-nosnappy-to-hapq-mov | 1 +
tests/ref/fate/mov-zombie | 2 +-
tests/ref/fate/mxf-probe-d10  | 1 +
tests/ref/fate/mxf-probe-dnxhd| 1 +
tests/ref/fate/mxf-probe-dv25 | 1 +
20 files changed, 28 insertions(+), 12 deletions(-)


LGTM, will apply.

Regards,
Marton



diff --git a/doc/ffprobe.xsd b/doc/ffprobe.xsd
index 97dc67def6..71cbd23ec6 100644
--- a/doc/ffprobe.xsd
+++ b/doc/ffprobe.xsd
@@ -226,6 +226,7 @@
  
  
  
+  
  
  
  
diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c
index 840fcb71e2..5515e1b31b 100644
--- a/fftools/ffprobe.c
+++ b/fftools/ffprobe.c
@@ -2547,6 +2547,7 @@ static int show_stream(WriterContext *w, AVFormatContext 
*fmt_ctx, int stream_id
if (dec_ctx) {
print_int("coded_width",  dec_ctx->coded_width);
print_int("coded_height", dec_ctx->coded_height);
+print_int("closed_captions", !!(dec_ctx->properties & 
FF_CODEC_PROPERTY_CLOSED_CAPTIONS));
}
#endif
print_int("has_b_frames", par->video_delay);
@@ -2951,6 +2952,7 @@ static int open_input_file(InputFile *ifile, const char 
*filename,
ist->dec_ctx->pkt_timebase = stream->time_base;
ist->dec_ctx->framerate = stream->avg_frame_rate;
#if FF_API_LAVF_AVCTX
+ist->dec_ctx->properties = stream->codec->properties;
ist->dec_ctx->coded_width = stream->codec->coded_width;
ist->dec_ctx->coded_height = stream->codec->coded_height;
#endif
diff --git a/tests/ref/fate/concat-demuxer-extended-lavf-mxf 
b/tests/ref/fate/concat-demuxer-extended-lavf-mxf
index 2fb5fce4b1..e49915e407 100644
--- a/tests/ref/fate/concat-demuxer-extended-lavf-mxf
+++ b/tests/ref/fate/concat-demuxer-extended-lavf-mxf
@@ -1 +1 @@
-a6fb9c37dc71cb43eb9664a8ae9f1c66 
*tests/data/fate/concat-demuxer-extended-lavf-mxf.ffprobe
+861b9c23587d0a09caa78c3651faf5a0 
*tests/data/fate/concat-demuxer-extended-lavf-mxf.ffprobe
diff --git a/tests/ref/fate/concat-demuxer-extended-lavf-mxf_d10 
b/tests/ref/fate/concat-demuxer-extended-lavf-mxf_d10
index 60d729b3da..e3e76f217a 100644
--- a/tests/ref/fate/concat-demuxer-extended-lavf-mxf_d10
+++ b/tests/ref/fate/concat-demuxer-extended-lavf-mxf_d10
@@ -1 +1 @@
-cb7c8eac6f8917e39658e1fa4a250da8 
*tests/data/fate/concat-demuxer-extended-lavf-mxf_d10.ffprobe
+d66177ea3922692bc91cd0f8aa907650 
*tests/data/fate/concat-demuxer-extended-lavf-mxf_d10.ffprobe
diff --git a/tests/ref/fate/concat-demuxer-simple1-lavf-mxf 
b/tests/ref/fate/concat-demuxer-simple1-lavf-mxf
index d18e35b7ba..a590f6f24b 100644
--- a/tests/ref/fate/concat-demuxer-simple1-lavf-mxf
+++ b/tests/ref/fate/concat-demuxer-simple1-lavf-mxf
@@ -120,5 +120,5 @@ 
audio|1|65280|1.36|65280|1.36|1920|0.04|N/A|N/A|3840|207872|K_|1
Strings Metadata
video|0|37|1.48|34|1.36|1|0.04|N/A|N/A|24786|212480|K_|1
Strings Metadata
-0|mpeg2video|4|video|1/25|[0][0][0][0]|0x|352|288|0|0|1|1:1|11:9|yuv420p|8|tv|unknown|unknown|unknown|left|progressive|N/A|1|N/A|25/1|25/1|1/25|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|51|0|0|0|0|0|0|0|0|0|0|0|0|0x060A2B340101010501010D001301
+0|mpeg2video|4|video|1/25|[0][0][0][0]|0x|352|288|0|0|0|1|1:1|11:9|yuv420p|8|tv|unknown|unknown|unknown|left|progressive|N/A|1|N/A|25/1|25/1|1/25|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|51|0|0|0|0|0|0|0|0|0|0|0|0|0x060A2B340101010501010D001301
1|pcm_s16le|unknown|audio|1/48000|[0][0][0][0]|0x|s16|48000|1|unknown|16|N/A|0/0|0/0|1/48000|0|0.00|N/A|N/A|768000|N/A|N/A|N/A|N/A|50|0|0|0|0|0|0|0|0|0|0|0|0|0x060A2B340101010501010D001301
diff --git a/tests/ref/fate/concat-demuxer-simple1-lavf-mxf_d10 
b/tests/ref/fate/concat-demuxer-simple1-lavf-mxf_d10
index e83d1bf847..79ce1e2306 100644

[FFmpeg-devel] [PATCH 1/1] ensure closed caption info which is visible in default stream dump is also available in results when -show_streams is used

2020-04-29 Thread vectronic
Signed-off-by: vectronic 
---
 doc/ffprobe.xsd   | 1 +
 fftools/ffprobe.c | 2 ++
 tests/ref/fate/concat-demuxer-extended-lavf-mxf   | 2 +-
 tests/ref/fate/concat-demuxer-extended-lavf-mxf_d10   | 2 +-
 tests/ref/fate/concat-demuxer-simple1-lavf-mxf| 2 +-
 tests/ref/fate/concat-demuxer-simple1-lavf-mxf_d10| 2 +-
 tests/ref/fate/concat-demuxer-simple2-lavf-ts | 2 +-
 tests/ref/fate/ffprobe_compact| 4 ++--
 tests/ref/fate/ffprobe_csv| 4 ++--
 tests/ref/fate/ffprobe_default| 2 ++
 tests/ref/fate/ffprobe_flat   | 2 ++
 tests/ref/fate/ffprobe_ini| 2 ++
 tests/ref/fate/ffprobe_json   | 2 ++
 tests/ref/fate/ffprobe_xml| 4 ++--
 tests/ref/fate/hapqa-extract-nosnappy-to-hapalphaonly-mov | 1 +
 tests/ref/fate/hapqa-extract-nosnappy-to-hapq-mov | 1 +
 tests/ref/fate/mov-zombie | 2 +-
 tests/ref/fate/mxf-probe-d10  | 1 +
 tests/ref/fate/mxf-probe-dnxhd| 1 +
 tests/ref/fate/mxf-probe-dv25 | 1 +
 20 files changed, 28 insertions(+), 12 deletions(-)

diff --git a/doc/ffprobe.xsd b/doc/ffprobe.xsd
index 97dc67def6..71cbd23ec6 100644
--- a/doc/ffprobe.xsd
+++ b/doc/ffprobe.xsd
@@ -226,6 +226,7 @@
   
   
   
+  
   
   
   
diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c
index 840fcb71e2..5515e1b31b 100644
--- a/fftools/ffprobe.c
+++ b/fftools/ffprobe.c
@@ -2547,6 +2547,7 @@ static int show_stream(WriterContext *w, AVFormatContext 
*fmt_ctx, int stream_id
 if (dec_ctx) {
 print_int("coded_width",  dec_ctx->coded_width);
 print_int("coded_height", dec_ctx->coded_height);
+print_int("closed_captions", !!(dec_ctx->properties & 
FF_CODEC_PROPERTY_CLOSED_CAPTIONS));
 }
 #endif
 print_int("has_b_frames", par->video_delay);
@@ -2951,6 +2952,7 @@ static int open_input_file(InputFile *ifile, const char 
*filename,
 ist->dec_ctx->pkt_timebase = stream->time_base;
 ist->dec_ctx->framerate = stream->avg_frame_rate;
 #if FF_API_LAVF_AVCTX
+ist->dec_ctx->properties = stream->codec->properties;
 ist->dec_ctx->coded_width = stream->codec->coded_width;
 ist->dec_ctx->coded_height = stream->codec->coded_height;
 #endif
diff --git a/tests/ref/fate/concat-demuxer-extended-lavf-mxf 
b/tests/ref/fate/concat-demuxer-extended-lavf-mxf
index 2fb5fce4b1..e49915e407 100644
--- a/tests/ref/fate/concat-demuxer-extended-lavf-mxf
+++ b/tests/ref/fate/concat-demuxer-extended-lavf-mxf
@@ -1 +1 @@
-a6fb9c37dc71cb43eb9664a8ae9f1c66 
*tests/data/fate/concat-demuxer-extended-lavf-mxf.ffprobe
+861b9c23587d0a09caa78c3651faf5a0 
*tests/data/fate/concat-demuxer-extended-lavf-mxf.ffprobe
diff --git a/tests/ref/fate/concat-demuxer-extended-lavf-mxf_d10 
b/tests/ref/fate/concat-demuxer-extended-lavf-mxf_d10
index 60d729b3da..e3e76f217a 100644
--- a/tests/ref/fate/concat-demuxer-extended-lavf-mxf_d10
+++ b/tests/ref/fate/concat-demuxer-extended-lavf-mxf_d10
@@ -1 +1 @@
-cb7c8eac6f8917e39658e1fa4a250da8 
*tests/data/fate/concat-demuxer-extended-lavf-mxf_d10.ffprobe
+d66177ea3922692bc91cd0f8aa907650 
*tests/data/fate/concat-demuxer-extended-lavf-mxf_d10.ffprobe
diff --git a/tests/ref/fate/concat-demuxer-simple1-lavf-mxf 
b/tests/ref/fate/concat-demuxer-simple1-lavf-mxf
index d18e35b7ba..a590f6f24b 100644
--- a/tests/ref/fate/concat-demuxer-simple1-lavf-mxf
+++ b/tests/ref/fate/concat-demuxer-simple1-lavf-mxf
@@ -120,5 +120,5 @@ 
audio|1|65280|1.36|65280|1.36|1920|0.04|N/A|N/A|3840|207872|K_|1
 Strings Metadata
 video|0|37|1.48|34|1.36|1|0.04|N/A|N/A|24786|212480|K_|1
 Strings Metadata
-0|mpeg2video|4|video|1/25|[0][0][0][0]|0x|352|288|0|0|1|1:1|11:9|yuv420p|8|tv|unknown|unknown|unknown|left|progressive|N/A|1|N/A|25/1|25/1|1/25|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|51|0|0|0|0|0|0|0|0|0|0|0|0|0x060A2B340101010501010D001301
+0|mpeg2video|4|video|1/25|[0][0][0][0]|0x|352|288|0|0|0|1|1:1|11:9|yuv420p|8|tv|unknown|unknown|unknown|left|progressive|N/A|1|N/A|25/1|25/1|1/25|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|51|0|0|0|0|0|0|0|0|0|0|0|0|0x060A2B340101010501010D001301
 
1|pcm_s16le|unknown|audio|1/48000|[0][0][0][0]|0x|s16|48000|1|unknown|16|N/A|0/0|0/0|1/48000|0|0.00|N/A|N/A|768000|N/A|N/A|N/A|N/A|50|0|0|0|0|0|0|0|0|0|0|0|0|0x060A2B340101010501010D001301
diff --git a/tests/ref/fate/concat-demuxer-simple1-lavf-mxf_d10 
b/tests/ref/fate/concat-demuxer-simple1-lavf-mxf_d10
index e83d1bf847..79ce1e2306 100644
--- a/tests/ref/fate/concat-demuxer-s