[FFmpeg-devel] [PATCH 1/3] avcodec: add NIT codec id

Anthony Delannoy anthony.2lannoy at gmail.com
Thu Oct 3 15:43:50 EEST 2019


hi,

here the first version of NIT table extraction from DVB stream.
Patch 2/3 only open default NIT pid whereas patch 3/3 read PAT table
to open even non-standard NIT pid.

Anthony Delannoy

---
 libavcodec/avcodec.h    | 1 +
 libavcodec/codec_desc.c | 6 ++++++
 libavcodec/version.h    | 2 +-
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index bcb931f0dd..92969ced83 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -691,6 +691,7 @@ enum AVCodecID {

     AV_CODEC_ID_SCTE_35, ///< Contain timestamp estimated through PCR of program stream.
     AV_CODEC_ID_EPG,
+    AV_CODEC_ID_NIT,
     AV_CODEC_ID_BINTEXT    = 0x18800,
     AV_CODEC_ID_XBIN,
     AV_CODEC_ID_IDF,
diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
index 0602ecb1b5..624befae91 100644
--- a/libavcodec/codec_desc.c
+++ b/libavcodec/codec_desc.c
@@ -3203,6 +3203,12 @@ static const AVCodecDescriptor codec_descriptors[] = {
         .name      = "epg",
         .long_name = NULL_IF_CONFIG_SMALL("Electronic Program Guide"),
     },
+    {
+        .id        = AV_CODEC_ID_NIT,
+        .type      = AVMEDIA_TYPE_DATA,
+        .name      = "nit",
+        .long_name = NULL_IF_CONFIG_SMALL("Network Information Table"),
+    },
     {
         .id        = AV_CODEC_ID_BINTEXT,
         .type      = AVMEDIA_TYPE_VIDEO,
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 04b210371e..64e23659f4 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -28,7 +28,7 @@
 #include "libavutil/version.h"

 #define LIBAVCODEC_VERSION_MAJOR  58
-#define LIBAVCODEC_VERSION_MINOR  59
+#define LIBAVCODEC_VERSION_MINOR  60
 #define LIBAVCODEC_VERSION_MICRO 101

 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
--
2.23.0


More information about the ffmpeg-devel mailing list