cpplint fixes

pull/2704/head
Isaac Connor 2019-09-09 16:13:32 -04:00
parent 922273410b
commit d5aa95e45f
2 changed files with 22 additions and 21 deletions

View File

@ -20,13 +20,14 @@
#define __STDC_FORMAT_MACROS 1
#include <cinttypes>
#include <stdlib.h>
#include <string.h>
#include "zm.h"
#include "zm_videostore.h"
#include <stdlib.h>
#include <string.h>
#include <cinttypes>
extern "C" {
#include "libavutil/time.h"
}
@ -653,7 +654,7 @@ bool VideoStore::setup_resampler() {
#else
// codec is already open in ffmpeg_camera
audio_in_ctx = audio_in_stream->codec;
audio_in_codec = (AVCodec *)audio_in_ctx->codec;
audio_in_codec = reinterpret_cast<AVCodec *>audio_in_ctx->codec;
//audio_in_codec = avcodec_find_decoder(audio_in_stream->codec->codec_id);
#endif
@ -867,7 +868,7 @@ bool VideoStore::setup_resampler() {
NULL, audio_out_ctx->channels,
audio_out_ctx->frame_size,
audio_out_ctx->sample_fmt, 0);
converted_in_samples = (uint8_t *)av_malloc(audioSampleBuffer_size);
converted_in_samples = reinterpret_cast<uint8_t *>(av_malloc(audioSampleBuffer_size));
if ( !converted_in_samples ) {
Error("Could not allocate converted in sample pointers");
@ -971,7 +972,7 @@ int VideoStore::writeVideoFramePacket(AVPacket *ipkt) {
// && ( ipkt->dts >= 0 ) ) {
// This is the first packet.
opkt.dts = 0;
Debug(1, "Starting video first_dts will become (%" PRId64 ")", ipkt->dts);
Debug(2, "Starting video first_dts will become (%" PRId64 ")", ipkt->dts);
video_first_dts = ipkt->dts;
#if 1
if ( audio_in_stream ) {
@ -1231,10 +1232,10 @@ int VideoStore::writeAudioFramePacket(AVPacket *ipkt) {
write_packet(&opkt, audio_out_stream);
zm_av_packet_unref(&opkt);
} // end if encoding or copying
} // end if encoding or copying
return 0;
} // end int VideoStore::writeAudioFramePacket(AVPacket *ipkt)
} // end int VideoStore::writeAudioFramePacket(AVPacket *ipkt)
int VideoStore::write_packet(AVPacket *pkt, AVStream *stream) {
pkt->pos = -1;
@ -1267,7 +1268,7 @@ int VideoStore::write_packet(AVPacket *pkt, AVStream *stream) {
} else {
Debug(2, "Success writing packet");
}
} // end int VideoStore::write_packet(AVPacket *pkt, AVStream *stream)
} // end int VideoStore::write_packet(AVPacket *pkt, AVStream *stream)
int VideoStore::resample_audio() {
// Resample the in_frame into the audioSampleBuffer until we process the whole
@ -1354,4 +1355,4 @@ int VideoStore::resample_audio() {
return 0;
#endif
return 1;
} // end int VideoStore::resample_audio
} // end int VideoStore::resample_audio

View File

@ -56,7 +56,7 @@ function dbConnect() {
$dbConn->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
$dbConn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch(PDOException $ex ) {
} catch(PDOException $ex) {
echo 'Unable to connect to ZM db.' . $ex->getMessage();
error_log('Unable to connect to ZM DB ' . $ex->getMessage());
$dbConn = null;