summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/libflash/libflashplugin.cpp
Side-by-side diff
Diffstat (limited to 'core/multimedia/opieplayer/libflash/libflashplugin.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/multimedia/opieplayer/libflash/libflashplugin.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/multimedia/opieplayer/libflash/libflashplugin.cpp b/core/multimedia/opieplayer/libflash/libflashplugin.cpp
index 538c695..78cf555 100644
--- a/core/multimedia/opieplayer/libflash/libflashplugin.cpp
+++ b/core/multimedia/opieplayer/libflash/libflashplugin.cpp
@@ -130,49 +130,53 @@ bool LibFlashPlugin::open( const QString& fileName ) {
fd->clip_x = 0;
fd->clip_y = 0;
fd->clip_width = 0;
fd->clip_height = 0;
char *buffer;
long size;
int status;
struct FlashInfo fi;
if (readFile(fileName.latin1(), &buffer, &size) < 0)
exit(2);
if (!(file = FlashNew()))
exit(1);
do
status = FlashParse(file, 0, buffer, size);
while (status & FLASH_PARSE_NEED_DATA);
free(buffer);
FlashGetInfo(file, &fi);
//FlashSettings(flashHandle, PLAYER_LOOP);
FlashGraphicInit(file, fd);
+#ifdef QT_QWS_DEVFS
+ FlashSoundInit(file, "/dev/sound/dsp");
+#else
FlashSoundInit(file, "/dev/dsp");
+#endif
FlashSetGetUrlMethod(file, showUrl, 0);
FlashSetGetSwfMethod(file, getSwf, (void*)file);
printf("opened file\n");
}
// If decoder doesn't support audio then return 0 here
bool LibFlashPlugin::audioSetSample( long sample, int stream ) { return TRUE; }
long LibFlashPlugin::audioGetSample( int stream ) { return 0; }
//bool LibFlashPlugin::audioReadMonoSamples( short *output, long samples, long& samplesRead, int stream ) { return TRUE; }
//bool LibFlashPlugin::audioReadStereoSamples( short *output, long samples, long& samplesRead, int stream ) { return FALSE; }
bool LibFlashPlugin::audioReadSamples( short *output, int channels, long samples, long& samplesRead, int stream ) { return FALSE; }
//bool LibFlashPlugin::audioReadSamples( short *output, int channel, long samples, int stream ) { return TRUE; }
//bool LibFlashPlugin::audioReReadSamples( short *output, int channel, long samples, int stream ) { return TRUE; }
// If decoder doesn't support video then return 0 here
int LibFlashPlugin::videoStreams() { return 1; }
int LibFlashPlugin::videoWidth( int stream ) { return 300; }
int LibFlashPlugin::videoHeight( int stream ) { return 200; }
double LibFlashPlugin::videoFrameRate( int stream ) { return 25.0; }
int LibFlashPlugin::videoFrames( int stream ) { return 1000000; }
bool LibFlashPlugin::videoSetFrame( long frame, int stream ) { return TRUE; }
long LibFlashPlugin::videoGetFrame( int stream ) { return 0; }
bool LibFlashPlugin::videoReadFrame( unsigned char **output_rows, int in_x, int in_y, int in_w, int in_h, ColorFormat color_model, int stream ) { return TRUE; }