aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--videocodec/Android.mk4
-rw-r--r--videocodec/OMXVideoEncoderAVC.cpp2
-rwxr-xr-xvideocodec/OMXVideoEncoderBase.cpp11
-rw-r--r--videocodec/OMXVideoEncoderBase.h6
-rw-r--r--videocodec/OMXVideoEncoderH263.cpp2
-rw-r--r--videocodec/OMXVideoEncoderMPEG4.cpp2
-rw-r--r--videocodec/OMXVideoEncoderVP8.cpp2
7 files changed, 19 insertions, 10 deletions
diff --git a/videocodec/Android.mk b/videocodec/Android.mk
index 5cde940..813f7b4 100644
--- a/videocodec/Android.mk
+++ b/videocodec/Android.mk
@@ -386,6 +386,7 @@ LOCAL_SHARED_LIBRARIES := \
libva-android \
libva-tpi \
libutils \
+ libcutils \
libhardware \
libintelmetadatabuffer
@@ -424,6 +425,7 @@ LOCAL_SHARED_LIBRARIES := \
libva-android \
libva-tpi \
libutils \
+ libcutils \
libhardware \
libintelmetadatabuffer
@@ -465,6 +467,7 @@ LOCAL_SHARED_LIBRARIES := \
libva-android \
libva-tpi \
libutils \
+ libcutils \
libhardware \
libintelmetadatabuffer
@@ -546,6 +549,7 @@ LOCAL_SHARED_LIBRARIES := \
libva-android \
libva-tpi \
libutils \
+ libcutils \
libhardware \
libintelmetadatabuffer
diff --git a/videocodec/OMXVideoEncoderAVC.cpp b/videocodec/OMXVideoEncoderAVC.cpp
index 5fb7139..04a27ba 100644
--- a/videocodec/OMXVideoEncoderAVC.cpp
+++ b/videocodec/OMXVideoEncoderAVC.cpp
@@ -14,9 +14,7 @@
* limitations under the License.
*/
-//#define LOG_NDEBUG 0
#define LOG_TAG "OMXVideoEncoderAVC"
-#include <utils/Log.h>
#include "OMXVideoEncoderAVC.h"
#include "IntelMetadataBuffer.h"
diff --git a/videocodec/OMXVideoEncoderBase.cpp b/videocodec/OMXVideoEncoderBase.cpp
index 4880a9c..2c50949 100755
--- a/videocodec/OMXVideoEncoderBase.cpp
+++ b/videocodec/OMXVideoEncoderBase.cpp
@@ -15,11 +15,11 @@
*/
-// #define LOG_NDEBUG 0
#define LOG_TAG "OMXVideoEncoderBase"
-#include <utils/Log.h>
#include "OMXVideoEncoderBase.h"
#include "IntelMetadataBuffer.h"
+#include <cutils/properties.h>
+#include <cutils/log.h>
static const char *RAW_MIME_TYPE = "video/raw";
@@ -30,11 +30,18 @@ OMXVideoEncoderBase::OMXVideoEncoderBase()
,mFrameOutputCount(0)
,mFrameRetrieved(OMX_TRUE)
,mFirstFrame(OMX_TRUE)
+ ,mOmxLogLevel(0)
,mStoreMetaDataInBuffers(OMX_FALSE)
,mSyncEncoding(OMX_TRUE){
mEncoderParams = new VideoParamsCommon();
if (!mEncoderParams) LOGE("OMX_ErrorInsufficientResources");
+ char logLevelProp[128];
+ if (property_get("omxenc.debug", logLevelProp, NULL)) {
+ mOmxLogLevel = atoi(logLevelProp);
+ LOGD("Debug level is %d", mOmxLogLevel);
+ }
+
LOGV("OMXVideoEncoderBase::OMXVideoEncoderBase end");
}
diff --git a/videocodec/OMXVideoEncoderBase.h b/videocodec/OMXVideoEncoderBase.h
index 497722f..5034ec0 100644
--- a/videocodec/OMXVideoEncoderBase.h
+++ b/videocodec/OMXVideoEncoderBase.h
@@ -24,6 +24,11 @@
#include <va/va_android.h>
#include <VideoEncoderHost.h>
+#define LOGV(...) LOGI_IF(mOmxLogLevel, __VA_ARGS__)
+#define LOGI(...) LOGI_IF(mOmxLogLevel, __VA_ARGS__)
+#define LOGW(...) LOGI_IF(mOmxLogLevel, __VA_ARGS__)
+#define LOGD(...) LOGI_IF(mOmxLogLevel, __VA_ARGS__)
+
using android::sp;
class OMXVideoEncoderBase : public OMXComponentCodecBase {
@@ -87,6 +92,7 @@ protected:
OMX_BOOL mFrameRetrieved;
OMX_BOOL mStoreMetaDataInBuffers;
OMX_BOOL mSyncEncoding;
+ int32_t mOmxLogLevel;
private:
diff --git a/videocodec/OMXVideoEncoderH263.cpp b/videocodec/OMXVideoEncoderH263.cpp
index bac58d0..4066fbf 100644
--- a/videocodec/OMXVideoEncoderH263.cpp
+++ b/videocodec/OMXVideoEncoderH263.cpp
@@ -15,9 +15,7 @@
*/
-//#define LOG_NDEBUG 0
#define LOG_TAG "OMXVideoEncoderH263"
-#include <utils/Log.h>
#include "OMXVideoEncoderH263.h"
static const char *H263_MIME_TYPE = "video/h263";
diff --git a/videocodec/OMXVideoEncoderMPEG4.cpp b/videocodec/OMXVideoEncoderMPEG4.cpp
index c8c2a2b..c3e6a5c 100644
--- a/videocodec/OMXVideoEncoderMPEG4.cpp
+++ b/videocodec/OMXVideoEncoderMPEG4.cpp
@@ -15,9 +15,7 @@
*/
-//#define LOG_NDEBUG 0
#define LOG_TAG "OMXVideoEncoderMPEG4"
-#include <utils/Log.h>
#include "OMXVideoEncoderMPEG4.h"
static const char *MPEG4_MIME_TYPE = "video/mpeg4";
diff --git a/videocodec/OMXVideoEncoderVP8.cpp b/videocodec/OMXVideoEncoderVP8.cpp
index f04cbec..8786f6e 100644
--- a/videocodec/OMXVideoEncoderVP8.cpp
+++ b/videocodec/OMXVideoEncoderVP8.cpp
@@ -1,7 +1,5 @@
-//#define LOG_NDEBUG 0
#define LOG_TAG "OMXVideoEncoderVP8"
-#include <utils/Log.h>
#include "OMXVideoEncoderVP8.h"
static const char *VP8_MIME_TYPE = "video/x-vnd.on2.vp8";