[FFmpeg-cvslog] Output MPEG-TS stream identifiers.

Kieran Kunhya git at videolan.org
Sat May 28 04:25:19 CEST 2011


ffmpeg | branch: master | Kieran Kunhya <kieran at kunhya.com> | Fri Mar  4 15:09:32 2011 +0000| [fa12fb3b00cb4e08a38a4fb192293347c218b3d3] | committer: Michael Niedermayer

Output MPEG-TS stream identifiers.

with changes by michael to simplify API

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fa12fb3b00cb4e08a38a4fb192293347c218b3d3
---

 libavformat/avformat.h |    7 +++++++
 libavformat/mpegts.c   |    3 +++
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 59123ca..6381526 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -607,6 +607,13 @@ typedef struct AVStream {
     int codec_info_nb_frames;
 
     /**
+     * Stream Identifier
+     * This is the MPEG-TS stream identifier +1
+     * 0 means unknown
+     */
+    int stream_identifier;
+
+    /**
      * Stream informations used internally by av_find_stream_info()
      */
 #define MAX_STD_TIMEBASES (60*12+5)
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index ea11a3e..9511ede 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -994,6 +994,9 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type
             stream_type == STREAM_TYPE_PRIVATE_DATA)
             mpegts_find_stream_type(st, st->codec->codec_tag, REGD_types);
         break;
+    case 0x52: /* stream identifier descriptor */
+        st->stream_identifier = 1 + get8(pp, desc_end);
+        break;
     default:
         break;
     }



More information about the ffmpeg-cvslog mailing list