Merge "Name the writer threads" into gingerbread
This commit is contained in:
@@ -15,7 +15,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <media/stagefright/AMRWriter.h>
|
#include <media/stagefright/AMRWriter.h>
|
||||||
|
|
||||||
#include <media/stagefright/MediaBuffer.h>
|
#include <media/stagefright/MediaBuffer.h>
|
||||||
#include <media/stagefright/MediaDebug.h>
|
#include <media/stagefright/MediaDebug.h>
|
||||||
#include <media/stagefright/MediaDefs.h>
|
#include <media/stagefright/MediaDefs.h>
|
||||||
@@ -23,6 +22,8 @@
|
|||||||
#include <media/stagefright/MediaSource.h>
|
#include <media/stagefright/MediaSource.h>
|
||||||
#include <media/stagefright/MetaData.h>
|
#include <media/stagefright/MetaData.h>
|
||||||
#include <media/mediarecorder.h>
|
#include <media/mediarecorder.h>
|
||||||
|
#include <sys/prctl.h>
|
||||||
|
#include <sys/resource.h>
|
||||||
|
|
||||||
namespace android {
|
namespace android {
|
||||||
|
|
||||||
@@ -194,6 +195,7 @@ status_t AMRWriter::threadFunc() {
|
|||||||
int64_t maxTimestampUs = 0;
|
int64_t maxTimestampUs = 0;
|
||||||
status_t err = OK;
|
status_t err = OK;
|
||||||
|
|
||||||
|
prctl(PR_SET_NAME, (unsigned long)"AMRWriter", 0, 0, 0);
|
||||||
while (!mDone) {
|
while (!mDone) {
|
||||||
MediaBuffer *buffer;
|
MediaBuffer *buffer;
|
||||||
err = mSource->read(&buffer);
|
err = mSource->read(&buffer);
|
||||||
|
|||||||
@@ -20,8 +20,9 @@
|
|||||||
|
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
|
|
||||||
#include <ctype.h>
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
#include <sys/prctl.h>
|
||||||
|
#include <sys/resource.h>
|
||||||
|
|
||||||
#include <media/stagefright/MPEG4Writer.h>
|
#include <media/stagefright/MPEG4Writer.h>
|
||||||
#include <media/stagefright/MediaBuffer.h>
|
#include <media/stagefright/MediaBuffer.h>
|
||||||
@@ -1104,6 +1105,7 @@ status_t MPEG4Writer::writeOneChunk() {
|
|||||||
void MPEG4Writer::threadFunc() {
|
void MPEG4Writer::threadFunc() {
|
||||||
LOGV("threadFunc");
|
LOGV("threadFunc");
|
||||||
|
|
||||||
|
prctl(PR_SET_NAME, (unsigned long)"MPEG4Writer", 0, 0, 0);
|
||||||
while (!mDone) {
|
while (!mDone) {
|
||||||
{
|
{
|
||||||
Mutex::Autolock autolock(mLock);
|
Mutex::Autolock autolock(mLock);
|
||||||
@@ -1632,6 +1634,11 @@ status_t MPEG4Writer::Track::threadEntry() {
|
|||||||
int64_t previousPausedDurationUs = 0;
|
int64_t previousPausedDurationUs = 0;
|
||||||
int64_t timestampUs;
|
int64_t timestampUs;
|
||||||
|
|
||||||
|
if (mIsAudio) {
|
||||||
|
prctl(PR_SET_NAME, (unsigned long)"AudioTrackEncoding", 0, 0, 0);
|
||||||
|
} else {
|
||||||
|
prctl(PR_SET_NAME, (unsigned long)"VideoTrackEncoding", 0, 0, 0);
|
||||||
|
}
|
||||||
sp<MetaData> meta_data;
|
sp<MetaData> meta_data;
|
||||||
|
|
||||||
mNumSamples = 0;
|
mNumSamples = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user