Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 448adcb4 authored by Ed Heyl's avatar Ed Heyl
Browse files

undo reset to ics-mr1 until we have a better method

parent ca89aab1
Loading
Loading
Loading
Loading
+20 −1
Original line number Diff line number Diff line
@@ -416,7 +416,7 @@ public:
     */
            status_t dump(int fd, const Vector<String16>& args) const;

private:
protected:
    /* copying audio tracks is not allowed */
                        AudioTrack(const AudioTrack& other);
            AudioTrack& operator = (const AudioTrack& other);
@@ -486,9 +486,28 @@ private:
    int                     mSessionId;
    int                     mAuxEffectId;
    Mutex                   mLock;
    bool                    mIsTimed;
    status_t                mRestoreStatus;
};

class TimedAudioTrack : public AudioTrack
{
public:
    TimedAudioTrack();

    /* allocate a shared memory buffer that can be passed to queueTimedBuffer */
    status_t allocateTimedBuffer(size_t size, sp<IMemory>* buffer);

    /* queue a buffer obtained via allocateTimedBuffer for playback at the
       given timestamp */
    status_t queueTimedBuffer(const sp<IMemory>& buffer, int64_t pts);

    /* define a transform between media time and either common time or
       local time */
    enum TargetTimeline {LOCAL_TIME, COMMON_TIME};
    status_t setMediaTimeTransform(const LinearTransform& xform,
                                   TargetTimeline target);
};

}; // namespace android

+1 −0
Original line number Diff line number Diff line
@@ -54,6 +54,7 @@ public:
                                uint32_t flags,
                                const sp<IMemory>& sharedBuffer,
                                int output,
                                bool isTimed,
                                int *sessionId,
                                status_t *status) = 0;

+18 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@
#include <utils/Errors.h>
#include <binder/IInterface.h>
#include <binder/IMemory.h>

#include <utils/LinearTransform.h>

namespace android {

@@ -69,6 +69,23 @@ public:

    /* get this tracks control block */
    virtual sp<IMemory> getCblk() const = 0;    

    /* Allocate a shared memory buffer suitable for holding timed audio
       samples */
    virtual status_t    allocateTimedBuffer(size_t size,
                                            sp<IMemory>* buffer) = 0;

    /* Queue a buffer obtained via allocateTimedBuffer for playback at the given
       timestamp */
    virtual status_t    queueTimedBuffer(const sp<IMemory>& buffer,
                                         int64_t pts) = 0;

    /* Define the linear transform that will be applied to the timestamps
       given to queueTimedBuffer (which are expressed in media time).
       Target specifies whether this transform converts media time to local time
       or Tungsten time. The values for target are defined in AudioTrack.h */
    virtual status_t    setMediaTimeTransform(const LinearTransform& xform,
                                              int target) = 0;
};

// ----------------------------------------------------------------------------
+3 −0
Original line number Diff line number Diff line
@@ -46,6 +46,9 @@ enum player_type {
    // The shared library with the test player is passed passed as an
    // argument to the 'test:' url in the setDataSource call.
    TEST_PLAYER = 5,

    AAH_RX_PLAYER = 100,
    AAH_TX_PLAYER = 101,
};


+40 −0
Original line number Diff line number Diff line
LOCAL_PATH:= $(call my-dir)
#
# libaah_rtp
#

include $(CLEAR_VARS)

LOCAL_MODULE := libaah_rtp
LOCAL_MODULE_TAGS := optional

LOCAL_SRC_FILES := \
    aah_decoder_pump.cpp \
    aah_rx_player.cpp \
    aah_rx_player_core.cpp \
    aah_rx_player_ring_buffer.cpp \
    aah_rx_player_substream.cpp \
    aah_tx_packet.cpp \
    aah_tx_player.cpp \
    aah_tx_sender.cpp \
    pipe_event.cpp

LOCAL_C_INCLUDES := \
    frameworks/base/include \
    frameworks/base/include/media/stagefright/openmax \
    frameworks/base/media \
    frameworks/base/media/libstagefright

LOCAL_SHARED_LIBRARIES := \
    libaah_timesrv_client \
    libbinder \
    libmedia \
    libstagefright \
    libstagefright_foundation \
    libutils

LOCAL_LDLIBS := \
    -lpthread

include $(BUILD_SHARED_LIBRARY)
Loading