| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
#ifndef _ANDROID_MEDIA_MEDIASYNC_H_ |
| 18 |
#define _ANDROID_MEDIA_MEDIASYNC_H_ |
| 19 |
|
| 20 |
#include <media/AudioResamplerPublic.h> |
| 21 |
#include <media/stagefright/foundation/ABase.h> |
| 22 |
#include <media/stagefright/MediaSync.h> |
| 23 |
#include <utils/Errors.h> |
| 24 |
#include <utils/RefBase.h> |
| 25 |
|
| 26 |
namespace android { |
| 27 |
|
| 28 |
class AudioTrack; |
| 29 |
class IGraphicBufferProducer; |
| 30 |
struct MediaClock; |
| 31 |
class MediaSync; |
| 32 |
|
| 33 |
struct JMediaSync : public RefBase { |
| 34 |
JMediaSync(); |
| 35 |
|
| 36 |
status_t setSurface(const sp<IGraphicBufferProducer> &bufferProducer); |
| 37 |
status_t setAudioTrack(const sp<AudioTrack> &audioTrack); |
| 38 |
|
| 39 |
status_t createInputSurface(sp<IGraphicBufferProducer>* bufferProducer); |
| 40 |
|
| 41 |
status_t updateQueuedAudioData(int sizeInBytes, int64_t presentationTimeUs); |
| 42 |
|
| 43 |
status_t getPlayTimeForPendingAudioFrames(int64_t *outTimeUs); |
| 44 |
|
| 45 |
status_t setPlaybackParams(const AudioPlaybackRate& rate); |
| 46 |
void getPlaybackParams(AudioPlaybackRate* rate ); |
| 47 |
status_t setSyncParams(const AVSyncSettings& syncParams); |
| 48 |
void getSyncParams(AVSyncSettings* syncParams ); |
| 49 |
status_t setVideoFrameRateHint(float rate); |
| 50 |
float getVideoFrameRate(); |
| 51 |
|
| 52 |
void flush(); |
| 53 |
|
| 54 |
sp<const MediaClock> getMediaClock(); |
| 55 |
|
| 56 |
protected: |
| 57 |
virtual ~JMediaSync(); |
| 58 |
|
| 59 |
private: |
| 60 |
sp<MediaSync> mSync; |
| 61 |
|
| 62 |
DISALLOW_EVIL_CONSTRUCTORS(JMediaSync); |
| 63 |
}; |
| 64 |
|
| 65 |
} |
| 66 |
|
| 67 |
#endif |