[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r31643 - in Extractor: . src/plugins
From: |
gnunet |
Subject: |
[GNUnet-SVN] r31643 - in Extractor: . src/plugins |
Date: |
Sat, 21 Dec 2013 04:11:12 +0100 |
Author: bratao
Date: 2013-12-21 04:11:12 +0100 (Sat, 21 Dec 2013)
New Revision: 31643
Modified:
Extractor/configure.ac
Extractor/src/plugins/previewopus_extractor.c
Log:
Build only with libav , remove unused variables.
Modified: Extractor/configure.ac
===================================================================
--- Extractor/configure.ac 2013-12-21 03:07:10 UTC (rev 31642)
+++ Extractor/configure.ac 2013-12-21 03:11:12 UTC (rev 31643)
@@ -672,11 +672,13 @@
then
ffmpeg_enabled=0
new_ffmpeg=0
- AC_CHECK_HEADERS([libavutil/frame.h],new_ffmpeg=1)
+ AC_CHECK_HEADERS([libavutil/frame.h],
+ AC_CHECK_HEADERS([libavresample/avresample.h],new_ffmpeg=1))
+
AC_CHECK_LIB(swscale, sws_getContext,
AC_CHECK_LIB(avcodec, avcodec_alloc_context3,
ffmpeg_enabled=1))
- AC_CHECK_HEADERS([libavutil/avutil.h ffmpeg/avutil.h libavformat/avformat.h
ffmpeg/avformat.h libavcodec/avcodec.h ffmpeg/avcodec.h libswscale/swscale.h
ffmpeg/swscale.h libavresample/avresample.h ffmpeg/avresample.h])
+ AC_CHECK_HEADERS([libavutil/avutil.h ffmpeg/avutil.h libavformat/avformat.h
ffmpeg/avformat.h libavcodec/avcodec.h ffmpeg/avcodec.h libswscale/swscale.h
ffmpeg/swscale.h])
fi
AM_CONDITIONAL(HAVE_FFMPEG, test x$ffmpeg_enabled != x0)
AM_CONDITIONAL(HAVE_FFMPEG_NEW, test x$new_ffmpeg != x0)
@@ -805,7 +807,7 @@
if test "x$new_ffmpeg" = "x0"
then
- AC_MSG_NOTICE([NOTICE: FFmpeg/opus audio preview plugin disabled])
+ AC_MSG_NOTICE([NOTICE: FFmpeg/opus audio preview plugin disabled, It needs
libav > 10, or a FFmpeg with --enable-libavresample])
fi
if test "x$without_gtk" = "xtrue"
Modified: Extractor/src/plugins/previewopus_extractor.c
===================================================================
--- Extractor/src/plugins/previewopus_extractor.c 2013-12-21 03:07:10 UTC
(rev 31642)
+++ Extractor/src/plugins/previewopus_extractor.c 2013-12-21 03:11:12 UTC
(rev 31643)
@@ -66,15 +66,14 @@
#endif
//TODO: Check for ffmpeg
-#if HAVE_LIBAVRESAMPLE_AVRESAMPLE_H
#include <libavresample/avresample.h>
-#elif HAVE_FFMPEG_AVRESAMPLE_H
-#include <ffmpeg/avresample.h>
-#endif
+
+
+
/**
* Set to 1 to enable debug output.
*/
@@ -202,19 +201,16 @@
AVFormatContext **output_format_context,
AVCodecContext **output_codec_context)
{
- AVIOContext *output_io_context = NULL;
AVStream *stream = NULL;
AVCodec *output_codec = NULL;
AVIOContext *io_ctx;
int error;
-
-
- AVDictionary *options;
+
unsigned char *iob;
if (NULL == (iob = av_malloc (16 * 1024)))
- return;
+ return AVERROR_EXIT;
if (NULL == (io_ctx = avio_alloc_context (iob, 16 * 1024,
AVIO_FLAG_WRITE, NULL,
NULL,
@@ -222,12 +218,12 @@
NULL)))
{
av_free (iob);
- return;
+ return AVERROR_EXIT;
}
if (NULL == ((*output_format_context) = avformat_alloc_context ()))
{
av_free (io_ctx);
- return;
+ return AVERROR_EXIT;
}
(*output_format_context)->pb = io_ctx;
@@ -825,7 +821,6 @@
static void
extract_audio (struct EXTRACTOR_ExtractContext *ec)
{
- AVPacket packet;
AVIOContext *io_ctx;
struct AVFormatContext *format_ctx;
AVCodecContext *codec_ctx;
@@ -833,23 +828,18 @@
AVCodec *codec;
AVDictionary *options;
AVFrame *frame;
-
AVCodecContext* output_codec_context = NULL;
-
-
AVAudioResampleContext *resample_context = NULL;
AVAudioFifo *fifo = NULL;
int audio_stream_index;
- int thumb_width;
- int thumb_height;
int i;
int err;
- int frame_finished;
int duration;
unsigned char *iob;
-
+
+
totalSize =0;
if (NULL == (iob = av_malloc (16 * 1024)))
@@ -982,7 +972,6 @@
if (err >= 0)
avcodec_flush_buffers (codec_ctx);
- frame_finished = 0;
/**
@@ -1120,7 +1109,6 @@
void
EXTRACTOR_previewopus_extract_method (struct EXTRACTOR_ExtractContext *ec)
{
- unsigned int i;
ssize_t iret;
void *data;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r31643 - in Extractor: . src/plugins,
gnunet <=