Explorar el Código

update rtsp server and libraries, fix choppy audio in libcallback, fix busybox for old fw versions including rtsp_fw

Alfonso Gamboa hace 3 años
padre
commit
d863ee689d

BIN
SD_ROOT/wz_mini/bin/busybox


BIN
SD_ROOT/wz_mini/bin/v4l2rtspserver


+ 0 - 0
SD_ROOT/wz_mini/etc/alsa.conf → SD_ROOT/wz_mini/etc/alsa/alsa.conf


+ 3 - 0
SD_ROOT/wz_mini/etc/init.d/v3_init.sh

@@ -23,6 +23,9 @@ sleep 2
 
 set -x
 
+#lets test this out and see how it goes, patched udhcpc for iCamera
+mount --bind /opt/wz_mini/bin/busybox /bin/busybox
+
 #WCV3 GPIO
 GPIO=63
 

BIN
SD_ROOT/wz_mini/lib/libasound.so.2


BIN
SD_ROOT/wz_mini/lib/libtinyalsa.so.2


BIN
SD_ROOT/wz_mini/lib/libtinyalsa.so.2.0.0


+ 0 - 4
SD_ROOT/wz_mini/run_mmc.sh

@@ -51,8 +51,6 @@ DEBUG_ENABLED="false"
 ##########CONFIG END#################
 #####################################
 
-echo  "run_mmc.sh start" > /dev/kmsg
-
 hostname_set() {
 	echo "set hostname"
 	hostname $HOSTNAME
@@ -352,8 +350,6 @@ if [[ "$RTSP_ENABLED" == "true" ]]; then
 	swap_enable
 	fi
 
-        mkdir /tmp/alsa
-        cp /media/mmc/wz_mini/etc/alsa.conf /tmp/alsa
 	/opt/wz_mini/bin/cmd video on
 	/opt/wz_mini/bin/cmd audio on
 

+ 5 - 3
libcallback_wz_mod/audio_callback.c

@@ -51,8 +51,8 @@ static uint32_t audio_pcm_capture(struct frames_st *frames) {
       .channels = 1,
       .rate = 16000,
       .format = PCM_FORMAT_S16_LE,
-      .period_size = 1024,
-      .period_count = 4,
+      .period_size = 128,
+      .period_count = 8,
       .start_threshold = 320,
       .silence_threshold = 0,
       .silence_size = 0,
@@ -80,11 +80,13 @@ static uint32_t audio_pcm_capture(struct frames_st *frames) {
 uint32_t local_sdk_audio_set_pcm_frame_callback(int ch, void *callback) {
 
   fprintf(stderr, "local_sdk_audio_set_pcm_frame_callback streamChId=%d, callback=0x%x\n", ch, callback);
-  if(ch == 0) {
+  static int ch_count = 0;
+  if( (ch == 0) && ch_count == 0) {
     audio_pcm_cb = callback;
     fprintf(stderr,"enc func injection save audio_pcm_cb=0x%x\n", audio_pcm_cb);
     callback = audio_pcm_capture;
   }
+  ch_count=ch_count+1
   return real_local_sdk_audio_set_pcm_frame_callback(ch, callback);
 }
 

BIN
libcallback_wz_mod/libcallback.so