patch文件执行问题

lancy_android 发布于 2013/12/14 01:04
阅读 714
收藏 0

请哪位高手看下一这个patch文件什么意思,在线等...

From 2d0fd0ce4f28b220065291a307be82cb7dbc11b2 Mon Sep 17 00:00:00 2001
From: lwj <linwenju@Exdroid1.(none)>
Date: Wed, 18 Sep 2013 09:21:11 +0800
Subject: [PATCH] transfer AudioPlayer.h into CedarX-Projects

---
 include/media/stagefright/CedarAAudioPlayer.h |  126 ------------------------
 include/media/stagefright/CedarXAudioPlayer.h |  127 -------------------------
 2 files changed, 253 deletions(-)
 delete mode 100755 include/media/stagefright/CedarAAudioPlayer.h
 delete mode 100755 include/media/stagefright/CedarXAudioPlayer.h

diff --git a/include/media/stagefright/CedarAAudioPlayer.h b/include/media/stagefright/CedarAAudioPlayer.h
deleted file mode 100755
index a3a8eaf..0000000
--- a/include/media/stagefright/CedarAAudioPlayer.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef CEDARX_AUDIO_PLAYER_H_
-
-#define CEDARX_AUDIO_PLAYER_H_
-
-#include <media/MediaPlayerInterface.h>
-#include <media/stagefright/MediaBuffer.h>
-#include <media/stagefright/TimeSource.h>
-#include <utils/threads.h>
-//#include <media/stagefright/MediaClock.h>
-
-namespace android {
-
-class MediaSource;
-class AudioTrack;
-class CedarAPlayer;
-
-class CedarAAudioPlayer {
-public:
-    enum {
-        REACHED_EOS,
-        SEEK_COMPLETE
-    };
-
-    CedarAAudioPlayer(const sp<MediaPlayerBase::AudioSink> &audioSink,
-                CedarAPlayer *audioObserver = NULL);
-
-    virtual ~CedarAAudioPlayer();
-
-    // Caller retains ownership of "source".
-    void setSource(const sp<MediaSource> &source);
-
-    void setFormat(int samplerate, int channel);
-
-
-    status_t start(bool sourceAlreadyStarted = false);
-
-    void pause(bool playPendingSamples = false);
-    void resume();
-
-    int getLatency();
-    int getSpace();
-    int render(void* data, int len);
-
-    status_t seekTo(int64_t time_us);
-
-    bool isSeeking();
-    bool reachedEOS(status_t *finalStatus);
-    //void setEventMark(uint32_t event);
-    int renderEnd();
-
-    int setForceExitStatus();
-
-
-private:
-    sp<MediaSource> mSource;
-    AudioTrack *mAudioTrack;
-
-    //bool mInitMediaClock;
-    //MediaClock *mMediaClock;
-
-    MediaBuffer *mInputBuffer;
-
-    int mForceExitStatus;
-
-    int mSampleRate;
-    int mNumChannels;
-    int64_t mLatencyUs;
-    size_t mFrameSize;
-
-    Mutex mLock;
-    int64_t mNumFramesPlayed;
-
-    int64_t mPositionTimeMediaUs;
-    int64_t mPositionTimeRealUs;
-
-    bool mSeeking;
-    bool mReachedEOS;
-    status_t mFinalStatus;
-    int64_t mSeekTimeUs;
-
-    bool mStarted;
-
-    bool mIsFirstBuffer;
-    status_t mFirstBufferResult;
-    MediaBuffer *mFirstBuffer;
-
-    sp<MediaPlayerBase::AudioSink> mAudioSink;
-    CedarAPlayer *mObserver;
-    char *mAudioBufferPtr;
-    int mAudioBufferSize;
-
-    static void AudioCallback(int event, void *user, void *info);
-    void AudioCallback(int event, void *info);
-
-    static size_t AudioSinkCallback(
-            MediaPlayerBase::AudioSink *audioSink,
-            void *data, size_t size, void *me);
-
-    size_t fillBuffer(void *data, size_t size);
-
-
-    void reset();
-
-    CedarAAudioPlayer(const CedarAAudioPlayer &);
-    CedarAAudioPlayer &operator=(const CedarAAudioPlayer &);
-};
-
-}  // namespace android
-
-#endif  // AUDIO_PLAYER_H_
diff --git a/include/media/stagefright/CedarXAudioPlayer.h b/include/media/stagefright/CedarXAudioPlayer.h
deleted file mode 100755
index 09b98ed..0000000
--- a/include/media/stagefright/CedarXAudioPlayer.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef CEDARX_AUDIO_PLAYER_H_
-
-#define CEDARX_AUDIO_PLAYER_H_
-
-#include <media/MediaPlayerInterface.h>
-#include <media/stagefright/MediaBuffer.h>
-#include <media/stagefright/TimeSource.h>
-#include <utils/threads.h>
-//#include <media/stagefright/MediaClock.h>
-
-namespace android {
-
-class MediaSource;
-class AudioTrack;
-class CedarXPlayer;
-
-class CedarXAudioPlayer {
-public:
-    enum {
-        REACHED_EOS,
-        SEEK_COMPLETE
-    };
-
-    enum {
-    	FlagsFillBuffer = 1,
-    };
-
-    CedarXAudioPlayer(const sp<MediaPlayerBase::AudioSink> &audioSink,
-                CedarXPlayer *audioObserver = NULL);
-
-    virtual ~CedarXAudioPlayer();
-
-    // Caller retains ownership of "source".
-    void setSource(const sp<MediaSource> &source);
-
-    void setFormat(int samplerate, int channel);
-
-
-    status_t start(bool sourceAlreadyStarted = false);
-
-    void pause(bool playPendingSamples = false);
-    void resume();
-
-    int getLatency();
-    int getSpace();
-    int render(void* data, int len);
-
-    status_t seekTo(int64_t time_us);
-
-    bool isSeeking();
-    bool reachedEOS(status_t *finalStatus);
-    //void setEventMark(uint32_t event);
-
-private:
-    sp<MediaSource> mSource;
-    AudioTrack *mAudioTrack;
-
-    //bool mInitMediaClock;
-    //MediaClock *mMediaClock;
-
-    MediaBuffer *mInputBuffer;
-
-    int mSampleRate;
-    int numChannels;
-    int64_t mLatencyUs;
-    size_t mFrameSize;
-
-    Mutex mLock, mLock2;
-    int64_t mNumFramesPlayed;
-
-    int64_t mPositionTimeMediaUs;
-    int64_t mPositionTimeRealUs;
-
-    bool mSeeking;
-    bool mReachedEOS;
-    status_t mFinalStatus;
-    int64_t mSeekTimeUs;
-
-    bool mStarted;
-
-    bool mIsFirstBuffer;
-    status_t mFirstBufferResult;
-    MediaBuffer *mFirstBuffer;
-
-    sp<MediaPlayerBase::AudioSink> mAudioSink;
-    CedarXPlayer *mObserver;
-    char *mAudioBufferPtr;
-    int mAudioBufferSize;
-    char *mAudioBufferPtrBak;
-    int mAudioBufferSizeBak;
-    int mFlags;
-
-    static void AudioCallback(int event, void *user, void *info);
-    void AudioCallback(int event, void *info);
-
-    static size_t AudioSinkCallback(
-            MediaPlayerBase::AudioSink *audioSink,
-            void *data, size_t size, void *me);
-
-    size_t fillBuffer(void *data, size_t size);
-    Condition mFillBufferCondition;
-
-    void reset();
-
-    CedarXAudioPlayer(const CedarXAudioPlayer &);
-    CedarXAudioPlayer &operator=(const CedarXAudioPlayer &);
-};
-
-}  // namespace android
-
-#endif  // AUDIO_PLAYER_H_
-- 
1.7.9.5
加载中
0
eechen
eechen
Linux上使用diff制作补丁(源代码),使用patch打补丁,diff和patch都是命令:

http://linux-wiki.cn/wiki/zh-hans/补丁(patch)的制作与应用

0
lancy_android
lancy_android
哥们,谢了
返回顶部
顶部