[Sumover-dev] [svn commit] r4169 - vic/branches/mpeg4/codec

sumover-dev at cs.ucl.ac.uk sumover-dev at cs.ucl.ac.uk
Wed Jun 4 12:57:06 BST 2008


Author: piers
Date: Wed Jun  4 12:57:05 2008
New Revision: 4169

Modified:
   vic/branches/mpeg4/codec/rtp_h264_depayloader.cpp
   vic/branches/mpeg4/codec/rtp_h264_depayloader.h

Log:
Reverted back to using ffpmeg's av_base64_decode() function as there were
problems with UCL common base64 decode and small Base64 sequences. Probably need to fix UCL common library implementation but this sorts out H.264 parameter
set decode for now. Successfully tested with Apple's Quicktime Broadcaster.


Modified: vic/branches/mpeg4/codec/rtp_h264_depayloader.cpp
==============================================================================
--- vic/branches/mpeg4/codec/rtp_h264_depayloader.cpp	(original)
+++ vic/branches/mpeg4/codec/rtp_h264_depayloader.cpp	Wed Jun  4 12:57:05 2008
@@ -1,8 +1,11 @@
 /*
  * RTP H264 Protocol (RFC3984)
  * Copyright (c) 2006 Ryan Martell.
+ * Modified by Socrates VaraKliotis and Piers O'Hanlon (c) 2008
+ * - Created H264Depayloader class out of the original C calls
+ * - Added custom handling for IOCOM H.264 
  *
- * This file is part of FFmpeg.
+ * This file was part of FFmpeg.
  *
  * FFmpeg is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -58,9 +61,6 @@
 
 //using namespace std;
 
-
-
-
 /**
  * Return TRUE if val is a prefix of str. If it returns TRUE, ptr is
  * set to the next character in 'str' after the prefix.
@@ -262,7 +262,7 @@
             if (*value == ',')
                 value++;
 
-            packet_size= base64decode((const unsigned char *)base64packet, dst-base64packet-1, decoded_packet, sizeof(decoded_packet));
+	    packet_size=av_base64_decode(decoded_packet, base64packet, sizeof(decoded_packet));
             if (packet_size) {
                 uint8_t *dest= (uint8_t *) av_malloc(packet_size+sizeof(start_sequence)+codec->extradata_size);
                 if(dest)
@@ -306,7 +306,7 @@
     assert(data->cookie == MAGIC_COOKIE);
     assert(buf);
 
-    //fprintf(stderr, /*NULL, AV_LOG_ERROR,*/ "H264_RTP: Single NAL type (%d, equiv. to >=1 or <=23), len=%4d\n", type, len);
+    fprintf(stderr, /*NULL, AV_LOG_ERROR,*/ "H264_RTP: Single NAL type (%d, equiv. to >=1 or <=23), len=%4d\n", type, len);
 
     if (buf[0]==0x02 && buf[1]==0x5d && buf[2]==0x47){
       type=99; // IOCOM's non-standard H.264 packet format

Modified: vic/branches/mpeg4/codec/rtp_h264_depayloader.h
==============================================================================
--- vic/branches/mpeg4/codec/rtp_h264_depayloader.h	(original)
+++ vic/branches/mpeg4/codec/rtp_h264_depayloader.h	Wed Jun  4 12:57:05 2008
@@ -24,9 +24,9 @@
 
 extern "C"
 {
-#include "avcodec.h"
-#include "avformat.h"
-#include "base64.h"
+#include "libavcodec/avcodec.h"
+#include "libavformat/avformat.h"
+#include "libavutil/base64.h"
 #include "packetbuffer.h"
 //#include "rtp_internal.h"
 //#include "mpegts.h"



More information about the Sumover-dev mailing list