50 #ifndef FFmpegAudioProvider_H_
51 #define FFmpegAudioProvider_H_
55 #include "mb/interface/IContinuousMediaProvider.h"
56 #include "FusionSoundAudioProvider.h"
57 using namespace ::br::pucrio::telemidia::ginga::core::mb;
60 #define INT64_C(c) (c ## LL)
61 #define UINT64_C(c) (c ## ULL)
73 #include <sys/types.h>
84 #include <direct/types.h>
85 #include <direct/list.h>
86 #include <direct/messages.h>
87 #include <direct/memcpy.h>
88 #include <direct/thread.h>
89 #include <direct/util.h>
94 #include "fusionsound/fusionsound_limits.h"
96 #include "libavutil/common.h"
97 #include "libavcodec/avcodec.h"
98 #include "libavformat/avformat.h"
113 pthread_mutex_t lock;
118 IDirectFBEventBuffer *buffer;
124 DFBVideoProviderStatus status;
125 DFBVideoProviderPlaybackFlags flags;
129 IDirectFBDataBuffer *buffer;
134 AVFormatContext* context;
139 DirectThread *thread;
140 pthread_mutex_t lock;
150 DirectThread *thread;
151 pthread_mutex_t lock;
165 IFusionSoundStream *stream;
166 IFusionSoundPlayback *playback;
174 DVFrameCallback callback;
178 DFBVideoProviderEventType events_mask;
179 pthread_mutex_t events_lock;
183 #define IO_BUFFER_SIZE 8
185 #define MAX_QUEUE_LEN 3
187 #define GAP_TOLERANCE 15000
189 #define GAP_THRESHOLD 250000
198 namespace telemidia {
205 GingaScreenID myScreen;
208 static bool _ffmpegInitialized;
216 bool initializeFFmpeg(
const char* mrl);
219 void setLoadSymbol(
string symbol);
220 string getLoadSymbol();
222 bool getHasVisual(){
return false;};
223 void setAVPid(
int aPid,
int vPid);
224 void* getProviderContent();
225 void setProviderContent(
void* content){};
229 IDirectFBSurface* getPerfectDFBSurface();
234 void getOriginalResolution(
int* width,
int* height);
235 double getTotalMediaTime();
237 double getMediaTime();
238 void setMediaTime(
double pos);
241 bool updateVisualData(
ISurface* surface);
244 static void dynamicRenderCallBack(
void* surface);
249 void resume(
ISurface* surface,
bool hasVisual=
true);
252 void setSoundLevel(
float level);
254 void refreshDR(
void* data){};
Definition: FFmpegAudioProvider.h:108
Definition: FFmpegAudioProvider.h:116
Definition: NetworkUtil.h:53
Definition: IContinuousMediaProvider.h:71
Definition: IProviderListener.h:59
Definition: FFmpegAudioProvider.h:121
Definition: FFmpegAudioProvider.h:202
Definition: FFmpegAudioProvider.h:103
Definition: ISurface.h:64