Skip to content

Commit

Permalink
Merge branch 'jb_2.6_1' of git://codeaurora.org/platform/hardware/qco…
Browse files Browse the repository at this point in the history
…m/media into cm-10.2
  • Loading branch information
hyperb1iss committed Nov 16, 2013
2 parents f5f5fcb + fb094cf commit 253c44f
Show file tree
Hide file tree
Showing 15 changed files with 378 additions and 250 deletions.
24 changes: 17 additions & 7 deletions dashplayer/DashPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -918,8 +918,16 @@ void DashPlayer::onMessageReceived(const sp<AMessage> &msg) {
if (what == kWhatBufferingStart) {
ALOGE("Source Notified Buffering Start for %s ",mTrackName);
if (mBufferingNotification == false) {
mBufferingNotification = true;
notifyListener(MEDIA_INFO, MEDIA_INFO_BUFFERING_START, 0);
if (track == kVideo && mNativeWindow == NULL)
{
ALOGE("video decoder not instantiated, no buffering for video",
mBufferingNotification);
}
else
{
mBufferingNotification = true;
notifyListener(MEDIA_INFO, MEDIA_INFO_BUFFERING_START, 0);
}
}
else {
ALOGE("Buffering Start Event Already Notified mBufferingNotification(%d)",
Expand Down Expand Up @@ -1303,10 +1311,11 @@ status_t DashPlayer::feedDecoderInputData(int track, const sp<AMessage> &msg) {
reply->post();
return OK;
}
else if ( (track == kText) && (err == ERROR_END_OF_STREAM))
{
sendTextPacket(NULL,ERROR_END_OF_STREAM);
return ERROR_END_OF_STREAM;
else if ((track == kText) &&
(err == ERROR_END_OF_STREAM || err == (status_t)UNKNOWN_ERROR)) {
ALOGE("Text track has encountered error %d", err );
sendTextPacket(NULL, err);
return err;
}
}

Expand Down Expand Up @@ -1596,7 +1605,8 @@ void DashPlayer::sendTextPacket(sp<ABuffer> accessUnit,status_t err)

//Local setting
parcel.writeInt32(KEY_LOCAL_SETTING);
if (err == ERROR_END_OF_STREAM)
if (err == ERROR_END_OF_STREAM ||
err == (status_t)UNKNOWN_ERROR)
{
parcel.writeInt32(KEY_TEXT_EOS);
// write size of sample
Expand Down
14 changes: 13 additions & 1 deletion mm-core/inc/OMX_QCOMExtns.h
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,9 @@ enum OMX_QCOM_EXTN_INDEXTYPE
QOMX_IndexConfigVideoLTRUse = 0x7F00002B,

/*"OMX.QCOM.index.config.video.LTRMark"*/
QOMX_IndexConfigVideoLTRMark = 0x7F00002C
QOMX_IndexConfigVideoLTRMark = 0x7F00002C,

OMX_GoogleAndroidIndexPrepareForAdaptivePlayback = 0x7F00002D,
};

/**
Expand Down Expand Up @@ -713,6 +715,16 @@ typedef struct OMX_QCOM_VIDEO_CONFIG_QPRANGE
OMX_U32 nMaxQP; /** The number for maximum quantization parameter */
} OMX_QCOM_VIDEO_CONFIG_QPRANGE;

typedef struct PrepareForAdaptivePlaybackParams
{
OMX_U32 nSize;
OMX_VERSIONTYPE nVersion;
OMX_U32 nPortIndex;
OMX_BOOL bEnable;
OMX_U32 nMaxFrameWidth;
OMX_U32 nMaxFrameHeight;
} PrepareForAdaptivePlaybackParams;


typedef struct OMX_VENDOR_EXTRADATATYPE {
OMX_U32 nPortIndex;
Expand Down
21 changes: 20 additions & 1 deletion mm-video/vidc/common/inc/extra_data_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,28 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
extern "C"{
#include<utils/Log.h>
}
#ifdef ENABLE_DEBUG_LOW
#define DEBUG_PRINT_LOW ALOGE
#else
#define DEBUG_PRINT_LOW
#endif
#ifdef ENABLE_DEBUG_HIGH
#define DEBUG_PRINT_HIGH ALOGE
#else
#define DEBUG_PRINT_HIGH
#endif
#ifdef ENABLE_DEBUG_ERROR
#define DEBUG_PRINT_ERROR ALOGE
#else
#define DEBUG_PRINT_ERROR
#endif

#else //_ANDROID_
#define DEBUG_PRINT_LOW printf
#define DEBUG_PRINT_HIGH printf
#define DEBUG_PRINT_ERROR printf
#endif // _ANDROID_

#include "vidc_debug.h"
#define SEI_PAYLOAD_FRAME_PACKING_ARRANGEMENT 0x2D
#define H264_START_CODE 0x01
#define NAL_TYPE_SEI 0x06
Expand Down
61 changes: 0 additions & 61 deletions mm-video/vidc/common/inc/vidc_debug.h

This file was deleted.

11 changes: 9 additions & 2 deletions mm-video/vidc/common/src/vidc_color_converter.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
Copyright (c) 2012, The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Expand Down Expand Up @@ -28,7 +28,14 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <utils/Log.h>
#include <gralloc_priv.h>
#include "vidc_color_converter.h"
#include "vidc_debug.h"
#undef DEBUG_PRINT_LOW
#undef DEBUG_PRINT_HIGH
#undef DEBUG_PRINT_ERROR

#define DEBUG_PRINT_LOW ALOGV
#define DEBUG_PRINT_HIGH ALOGE
#define DEBUG_PRINT_ERROR ALOGE

omx_c2d_conv::omx_c2d_conv()
{
c2dcc = NULL;
Expand Down
10 changes: 8 additions & 2 deletions mm-video/vidc/vdec/inc/omx_vdec.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ extern "C"{
#define LOG_TAG "OMX-VDEC"
#endif

#else //_ANDROID_
#define DEBUG_PRINT_LOW printf
#define DEBUG_PRINT_HIGH printf
#define DEBUG_PRINT_ERROR printf
#endif // _ANDROID_

#if defined (_ANDROID_HONEYCOMB_) || defined (_ANDROID_ICS_)
Expand Down Expand Up @@ -99,7 +103,6 @@ extern "C"{
#include "extra_data_handler.h"
#include "ts_parser.h"
#include "vidc_color_converter.h"
#include "vidc_debug.h"
extern "C" {
OMX_API void * get_omx_component_factory_fn(void);
}
Expand Down Expand Up @@ -657,7 +660,7 @@ class omx_vdec: public qc_omx_component
{
if (m_cb.EventHandler && !m_error_propogated)
{
DEBUG_PRINT_ERROR("\nERROR: Sending OMX_EventError to Client");
ALOGE("\nERROR: Sending OMX_EventError to Client");
m_error_propogated = true;
m_cb.EventHandler(&m_cmp,m_app_data,
OMX_EventError,OMX_ErrorHardware,0,NULL);
Expand Down Expand Up @@ -786,6 +789,9 @@ class omx_vdec: public qc_omx_component
OMX_U32 m_demux_entries;
OMX_U32 m_disp_hor_size;
OMX_U32 m_disp_vert_size;
OMX_U32 m_smoothstreaming_height;
OMX_U32 m_smoothstreaming_width;
bool m_use_smoothstreaming;

OMX_S64 prev_ts;
bool rst_prev_ts;
Expand Down
5 changes: 2 additions & 3 deletions mm-video/vidc/vdec/inc/ts_parser.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
Copyright (c) 2010-2013, The Linux Foundation. All rights reserved.
Copyright (c) 2010-2012, The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Expand Down Expand Up @@ -31,7 +31,6 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "OMX_Core.h"
#include "OMX_QCOMExtns.h"
#include "qc_omx_component.h"
#include "vidc_debug.h"

#include<stdlib.h>

Expand Down Expand Up @@ -77,7 +76,7 @@ class omx_time_stamp_reorder {
void delete_list();
void handle_error()
{
DEBUG_PRINT_ERROR("Error handler called for TS Parser");
ALOGE("Error handler called for TS Parser");
if (error)
return;
error = true;
Expand Down
11 changes: 8 additions & 3 deletions mm-video/vidc/vdec/src/frameparser.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
Copyright (c) 2010-2011,2013, The Linux Foundation. All rights reserved.
Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Expand Down Expand Up @@ -43,15 +43,20 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <stdint.h>

#include "frameparser.h"
#include "vidc_debug.h"


#ifdef _ANDROID_
extern "C"{
#include<utils/Log.h>
}
#endif//_ANDROID_

#undef DEBUG_PRINT_LOW
#undef DEBUG_PRINT_HIGH
#undef DEBUG_PRINT_ERROR

#define DEBUG_PRINT_LOW ALOGV
#define DEBUG_PRINT_HIGH ALOGV
#define DEBUG_PRINT_ERROR ALOGE

static unsigned char H264_mask_code[4] = {0xFF,0xFF,0xFF,0xFF};
static unsigned char H264_start_code[4] = {0x00,0x00,0x00,0x01};
Expand Down
Loading

0 comments on commit 253c44f

Please sign in to comment.