[FFmpeg-soc] [soc]: r2340 - in dvbmuxer: mpegpes.h mpegpesenc.c mpegtsenc.c

bcoudurier subversion at mplayerhq.hu
Mon Jun 2 22:24:06 CEST 2008


Author: bcoudurier
Date: Mon Jun  2 22:24:05 2008
New Revision: 2340

Log:
remove useless program stream code this function is not yet used

Modified:
   dvbmuxer/mpegpes.h
   dvbmuxer/mpegpesenc.c
   dvbmuxer/mpegtsenc.c

Modified: dvbmuxer/mpegpes.h
==============================================================================
--- dvbmuxer/mpegpes.h	(original)
+++ dvbmuxer/mpegpes.h	Mon Jun  2 22:24:05 2008
@@ -149,7 +149,6 @@ void ff_pes_cal_header(StreamInfo *strea
  * @param [in] buf            Buffer to write to
  * @param [in] pts            Packet pts
  * @param [in] dts            Packet dts
- * @param [in] id             Stream ID
  * @param [in] start_code     PES packet startcode
  * @param [in] header_len     PES header size
  * @param [in] packet_size    Total packet size
@@ -158,8 +157,7 @@ void ff_pes_cal_header(StreamInfo *strea
  * @return                    Bytes written to buffer
  */
 int ff_pes_muxer_write(AVFormatContext *ctx, int stream_index, uint8_t *buf,
-          int64_t pts, int64_t dts, int id, int startcode,
-          uint8_t *pes_content, int pes_content_len,
+          int64_t pts, int64_t dts, int startcode,
           int header_len, int packet_size, int payload_size, int stuffing_size);
 
 /**

Modified: dvbmuxer/mpegpesenc.c
==============================================================================
--- dvbmuxer/mpegpesenc.c	(original)
+++ dvbmuxer/mpegpesenc.c	Mon Jun  2 22:24:05 2008
@@ -176,8 +176,7 @@ void ff_pes_cal_header(StreamInfo *strea
 }
 
 int ff_pes_muxer_write(AVFormatContext *ctx, int stream_index, uint8_t *buf,
-    int64_t pts, int64_t dts, int id, int startcode,
-    uint8_t *pes_content, int pes_content_len,
+    int64_t pts, int64_t dts, int startcode,
     int header_len, int packet_size, int payload_size, int stuffing_size)
 {
     StreamInfo *stream = ctx->streams[stream_index]->priv_data;
@@ -197,13 +196,6 @@ int ff_pes_muxer_write(AVFormatContext *
            pes_flags |= 0x40;
     }
 
-    /* Both the MPEG-2 and the SVCD standards demand that the
-       P-STD_buffer_size field be included in the first packet of
-       every stream. (see SVCD standard p. 26 V.2.3.1 and V.2.3.2
-       and MPEG-2 standard 2.7.7) */
-    if (stream->packet_number == 0 && strcmp(ctx->oformat->name, "mpegts"))
-        pes_flags |= 0x01;
-
     bytestream_put_byte(&q, pes_flags); /* flags */
     bytestream_put_byte(&q, header_len - 3 + stuffing_size);
 
@@ -212,16 +204,6 @@ int ff_pes_muxer_write(AVFormatContext *
     if (pes_flags & 0x40)  /* write dts */
         insert_timestamp(&q, 0x01, dts);
 
-    if (pes_flags & 0x01) {  /* write pes extension */
-        bytestream_put_byte(&q, 0x10); /* flags */
-
-        /* P-STD buffer info */
-        if (id == AUDIO_ID)
-            bytestream_put_be16(&q, 0x4000 | stream->max_buffer_size/128);
-        else
-            bytestream_put_be16(&q, 0x6000 | stream->max_buffer_size/1024);
-    }
-
     /* special stuffing byte that is always written
        to prevent accidental generation of startcodes. */
     bytestream_put_byte(&q, 0xff);
@@ -229,9 +211,6 @@ int ff_pes_muxer_write(AVFormatContext *
     for(i=0;i<stuffing_size;i++)
         bytestream_put_byte(&q, 0xff);
 
-    if(pes_content != NULL)
-        bytestream_put_buffer(&q, pes_content, pes_content_len);
-
     /* output data */
     if(av_fifo_read(&stream->fifo, q, data_size) < 0)
         return -1;

Modified: dvbmuxer/mpegtsenc.c
==============================================================================
--- dvbmuxer/mpegtsenc.c	(original)
+++ dvbmuxer/mpegtsenc.c	Mon Jun  2 22:24:05 2008
@@ -637,8 +637,8 @@ static int flush_packet(AVFormatContext 
                           &payload_size, &startcode, &stuffing_size,
                           &trailer_size, &pad_packet_bytes);
         pes_size = ff_pes_muxer_write(ctx, stream_index, stream->payload,
-                 pts, dts, id, stream->startcode, NULL, 0,
-                 header_len, packet_size, payload_size, stuffing_size);
+                 pts, dts, stream->startcode, header_len,
+                 packet_size, payload_size, stuffing_size);
         if(pes_size < 0)
             return -1;
         q += pes_size;



More information about the FFmpeg-soc mailing list