summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/libmpeg3
Unidiff
Diffstat (limited to 'core/multimedia/opieplayer/libmpeg3') (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/libmpeg3/libmpeg3plugin.h23
-rw-r--r--core/multimedia/opieplayer/libmpeg3/libmpeg3pluginimpl.cpp8
-rw-r--r--core/multimedia/opieplayer/libmpeg3/libmpeg3pluginimpl.h4
3 files changed, 17 insertions, 18 deletions
diff --git a/core/multimedia/opieplayer/libmpeg3/libmpeg3plugin.h b/core/multimedia/opieplayer/libmpeg3/libmpeg3plugin.h
index bd31706..b573e84 100644
--- a/core/multimedia/opieplayer/libmpeg3/libmpeg3plugin.h
+++ b/core/multimedia/opieplayer/libmpeg3/libmpeg3plugin.h
@@ -24,8 +24,7 @@
24#include <qapplication.h> 24#include <qapplication.h>
25#include "libmpeg3.h" 25#include "libmpeg3.h"
26#include "mpeg3protos.h" 26#include "mpeg3protos.h"
27//#include <qpe/mediaplayerplugininterface.h> 27#include <qpe/mediaplayerplugininterface.h>
28#include "../mediaplayerplugininterface.h"
29 28
30 29
31// #define OLD_MEDIAPLAYER_API 30// #define OLD_MEDIAPLAYER_API
@@ -51,7 +50,7 @@ public:
51 int audioStreams() { return file ? mpeg3_total_astreams( file ) : 0; } 50 int audioStreams() { return file ? mpeg3_total_astreams( file ) : 0; }
52 int audioChannels( int stream ) { return file ? mpeg3_audio_channels( file, stream ) : 0; } 51 int audioChannels( int stream ) { return file ? mpeg3_audio_channels( file, stream ) : 0; }
53 int audioFrequency( int stream ) { return file ? mpeg3_sample_rate( file, stream ) : 0; } 52 int audioFrequency( int stream ) { return file ? mpeg3_sample_rate( file, stream ) : 0; }
54 int audioBitsPerSample(int) { return 0;} 53/* int audioBitsPerSample(int) { return 0;} */
55 int audioSamples( int stream ) { return file ? mpeg3_audio_samples( file, stream ) : 0; } 54 int audioSamples( int stream ) { return file ? mpeg3_audio_samples( file, stream ) : 0; }
56 bool audioSetSample( long sample, int stream ) { return file ? mpeg3_set_sample( file, sample, stream) == 1 : FALSE; } 55 bool audioSetSample( long sample, int stream ) { return file ? mpeg3_set_sample( file, sample, stream) == 1 : FALSE; }
57 long audioGetSample( int stream ) { return file ? mpeg3_get_sample( file, stream ) : 0; } 56 long audioGetSample( int stream ) { return file ? mpeg3_get_sample( file, stream ) : 0; }
@@ -74,15 +73,15 @@ public:
74/* 73/*
75{ 74{
76 if ( file ) { 75 if ( file ) {
77 int frames = mpeg3_video_frames( file, stream ); 76 int frames = mpeg3_video_frames( file, stream );
78 if ( frames == 1 ) { 77 if ( frames == 1 ) {
79 int res = mpeg3_seek_percentage( file, 0.99 ); 78 int res = mpeg3_seek_percentage( file, 0.99 );
80 printf("res: %i\n", res ); 79 printf("res: %i\n", res );
81 mpeg3video_seek( file->vtrack[stream]->video ); 80 mpeg3video_seek( file->vtrack[stream]->video );
82 frames = mpeg3_get_frame( file, stream ); 81 frames = mpeg3_get_frame( file, stream );
83 mpeg3_seek_percentage( file, 0.0 ); 82 mpeg3_seek_percentage( file, 0.0 );
84 } 83 }
85 return frames; 84 return frames;
86 } 85 }
87 return 0; 86 return 0;
88} 87}
diff --git a/core/multimedia/opieplayer/libmpeg3/libmpeg3pluginimpl.cpp b/core/multimedia/opieplayer/libmpeg3/libmpeg3pluginimpl.cpp
index e7216af..bf3f372 100644
--- a/core/multimedia/opieplayer/libmpeg3/libmpeg3pluginimpl.cpp
+++ b/core/multimedia/opieplayer/libmpeg3/libmpeg3pluginimpl.cpp
@@ -30,14 +30,14 @@ LibMpeg3PluginImpl::LibMpeg3PluginImpl()
30LibMpeg3PluginImpl::~LibMpeg3PluginImpl() 30LibMpeg3PluginImpl::~LibMpeg3PluginImpl()
31{ 31{
32 if ( libmpeg3plugin ) 32 if ( libmpeg3plugin )
33 delete libmpeg3plugin; 33 delete libmpeg3plugin;
34} 34}
35 35
36 36
37MediaPlayerDecoder *LibMpeg3PluginImpl::decoder() 37MediaPlayerDecoder *LibMpeg3PluginImpl::decoder()
38{ 38{
39 if ( !libmpeg3plugin ) 39 if ( !libmpeg3plugin )
40 libmpeg3plugin = new LibMpeg3Plugin; 40 libmpeg3plugin = new LibMpeg3Plugin;
41 return libmpeg3plugin; 41 return libmpeg3plugin;
42} 42}
43 43
@@ -54,8 +54,8 @@ MediaPlayerEncoder *LibMpeg3PluginImpl::encoder()
54QRESULT LibMpeg3PluginImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 54QRESULT LibMpeg3PluginImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
55{ 55{
56 *iface = 0; 56 *iface = 0;
57 if ( ( uuid == IID_QUnknown ) || ( uuid == IID_MediaPlayerPlugin ) ) 57 if ( ( uuid == IID_QUnknown ) || ( uuid == IID_MediaPlayerPlugin ) )
58 *iface = this, (*iface)->addRef(); 58 *iface = this, (*iface)->addRef();
59 return QS_OK; 59 return QS_OK;
60} 60}
61 61
diff --git a/core/multimedia/opieplayer/libmpeg3/libmpeg3pluginimpl.h b/core/multimedia/opieplayer/libmpeg3/libmpeg3pluginimpl.h
index a2f5211..ef3743e 100644
--- a/core/multimedia/opieplayer/libmpeg3/libmpeg3pluginimpl.h
+++ b/core/multimedia/opieplayer/libmpeg3/libmpeg3pluginimpl.h
@@ -20,8 +20,8 @@
20#ifndef LIBMPEG3_PLUGIN_IMPL_H 20#ifndef LIBMPEG3_PLUGIN_IMPL_H
21#define LIBMPEG3_PLUGIN_IMPL_H 21#define LIBMPEG3_PLUGIN_IMPL_H
22 22
23//#include <qpe/mediaplayerplugininterface.h> 23#include <qpe/mediaplayerplugininterface.h>
24#include "../mediaplayerplugininterface.h" 24//#include "../mediaplayerplugininterface.h"
25 25
26 26
27class LibMpeg3Plugin; 27class LibMpeg3Plugin;