[FFmpeg-soc] [soc]: r5884 - in mms: mms.c mms.h mmsh.c mmst.c

spyfeng subversion at mplayerhq.hu
Mon Aug 2 17:47:34 CEST 2010


Author: spyfeng
Date: Mon Aug  2 17:47:34 2010
New Revision: 5884

Log:
rename mms common function for more specific.

Modified:
   mms/mms.c
   mms/mms.h
   mms/mmsh.c
   mms/mmst.c

Modified: mms/mms.c
==============================================================================
--- mms/mms.c	Sun Aug  1 10:59:39 2010	(r5883)
+++ mms/mms.c	Mon Aug  2 17:47:34 2010	(r5884)
@@ -24,7 +24,7 @@
 #include "asf.h"
 #include "libavutil/intreadwrite.h"
 
-int ff_read_header(MMSContext *mms, uint8_t *buf, int size)
+int ff_mms_read_header(MMSContext *mms, uint8_t *buf, int size)
 {
     char *pos;
     int size_to_copy;
@@ -39,7 +39,7 @@ int ff_read_header(MMSContext *mms, uint
     return size_to_copy;
 }
 
-int ff_read_data(MMSContext *mms, uint8_t *buf, const int buf_size)
+int ff_mms_read_data(MMSContext *mms, uint8_t *buf, const int buf_size)
 {
     int read_size;
     read_size = FFMIN(buf_size, mms->remaining_in_len);
@@ -49,7 +49,7 @@ int ff_read_data(MMSContext *mms, uint8_
     return read_size;
 }
 
-int ff_asf_header_parser(MMSContext *mms)
+int ff_mms_asf_header_parser(MMSContext *mms)
 {
     uint8_t *p = mms->asf_header;
     uint8_t *end;

Modified: mms/mms.h
==============================================================================
--- mms/mms.h	Sun Aug  1 10:59:39 2010	(r5883)
+++ mms/mms.h	Mon Aug  2 17:47:34 2010	(r5884)
@@ -56,7 +56,7 @@ typedef struct {
     int stream_num;                      ///< stream numbers.
 } MMSContext;
 
-int ff_asf_header_parser(MMSContext * mms);
-int ff_read_data(MMSContext *mms, uint8_t *buf, const int buf_size);
-int ff_read_header(MMSContext * mms, uint8_t * buf, int size);
+int ff_mms_asf_header_parser(MMSContext * mms);
+int ff_mms_read_data(MMSContext *mms, uint8_t *buf, const int buf_size);
+int ff_mms_read_header(MMSContext * mms, uint8_t * buf, int size);
 #endif

Modified: mms/mmsh.c
==============================================================================
--- mms/mmsh.c	Sun Aug  1 10:59:39 2010	(r5883)
+++ mms/mmsh.c	Mon Aug  2 17:47:34 2010	(r5884)
@@ -182,7 +182,7 @@ static int get_http_header_data(MMSHCont
             }
             mms->asf_header_size = len;
             if (!mms->header_parsed) {
-                res = ff_asf_header_parser(mms);
+                res = ff_mms_asf_header_parser(mms);
                 mms->header_parsed = 1;
                 return res;
             }
@@ -347,14 +347,14 @@ static int mmsh_read(URLContext *h, uint
     do{
         if (mms->asf_header_read_size < mms->asf_header_size) {
             // copy asf header into buffer
-            res = ff_read_header(mms, buf, size);
+            res = ff_mms_read_header(mms, buf, size);
         } else if (mms->remaining_in_len){
-            res = ff_read_data(mms, buf, size);
+            res = ff_mms_read_data(mms, buf, size);
         } else {
              // read data packet from network
             res = handle_chunk_type(mmsh_ctx);
             if (res == 0) {
-                res = ff_read_data(mms, buf, size);
+                res = ff_mms_read_data(mms, buf, size);
             } else {
                 dprintf(NULL, "other situation!\n");
             }

Modified: mms/mmst.c
==============================================================================
--- mms/mmst.c	Sun Aug  1 10:59:39 2010	(r5883)
+++ mms/mmst.c	Mon Aug  2 17:47:34 2010	(r5884)
@@ -555,7 +555,7 @@ static int mms_open(URLContext *h, const
         goto fail;
     if((mmst_ctx->incoming_flags != 0X08) && (mmst_ctx->incoming_flags != 0X0C))
         goto fail;
-    err = ff_asf_header_parser(mms);
+    err = ff_mms_asf_header_parser(mms);
     if (err) {
         dprintf(NULL, "asf header parsed failed!\n");
         goto fail;
@@ -596,11 +596,11 @@ static int mms_read(URLContext *h, uint8
     MMSContext *mms = mmst_ctx->ff_ctx;
     do {
         if(mms->asf_header_read_size < mms->asf_header_size) {
-           result =  ff_read_header(mms, buf, size);
+           result =  ff_mms_read_header(mms, buf, size);
         } else if(mms->remaining_in_len) {
             /* Read remaining packet data to buffer.
              * the result can not be zero because remaining_in_len is positive.*/
-            result = ff_read_data(mms, buf, size);
+            result = ff_mms_read_data(mms, buf, size);
         } else {
             /* Read from network */
             int err = mms_safe_send_recv(mmst_ctx, NULL, SC_PKT_ASF_MEDIA);
@@ -612,7 +612,7 @@ static int mms_read(URLContext *h, uint8
                     result= AVERROR_IO;
                 } else {
                     // copy the data to the packet buffer.
-                    result = ff_read_data(mms, buf, size);
+                    result = ff_mms_read_data(mms, buf, size);
                     if (result == 0) {
                         dprintf(NULL, "read asf media paket size is zero!\n");
                         break;


More information about the FFmpeg-soc mailing list