hi,
attached are two patches that add param "module_filename" to the c'tors
of EvasEmotion so it can be set correctly in the underlying emotion
object. The third patch corrects the simple emotion test app.
Cheers,
Jan
--- eflpp_emotion.cpp 2008-06-25 13:33:33.000000000 +0200
+++ eflpp_emotion_js.cpp 2008-06-25 13:26:23.000000000 +0200
@@ -14,46 +14,56 @@
// EvasEmotion
//===============================================================================================
-EvasEmotion::EvasEmotion( EvasCanvas* canvas, const char* name )
+EvasEmotion::EvasEmotion( const char * module_filename, EvasCanvas* canvas, const char* name )
:EvasObject( canvas )
{
o = emotion_object_add( canvas->obj() );
init( name ? name : "emotion" );
+ engineInit(module_filename);
}
-EvasEmotion::EvasEmotion( const char* filename, EvasCanvas* canvas, const char* name )
- :EvasObject( canvas )
+EvasEmotion::EvasEmotion( const char* filename, const char * module_filename,
+ EvasCanvas* canvas, const char* name ) :EvasObject( canvas )
{
o = emotion_object_add( canvas->obj() );
init( name ? name : filename );
-
+ engineInit(module_filename);
setFile( filename );
}
-EvasEmotion::EvasEmotion( int x, int y, const char* filename, EvasCanvas* canvas, const char* name )
+EvasEmotion::EvasEmotion( int x, int y, const char* filename, const char * module_filename,
+ EvasCanvas* canvas, const char* name )
:EvasObject( canvas )
{
o = emotion_object_add( canvas->obj() );
init( name ? name : filename );
-
+ engineInit(module_filename);
setFile( filename );
move( x, y );
}
-EvasEmotion::EvasEmotion( int x, int y, int width, int height, const char* filename, EvasCanvas* canvas, const char* name )
+EvasEmotion::EvasEmotion( int x, int y, int width, int height, const char* filename,
+ const char * module_filename, EvasCanvas* canvas, const char* name )
:EvasObject( canvas )
{
- o = emotion_object_add( canvas->obj() );
+ printf("EvasEmotion::EvasEmotion, begin \n");
+ o = emotion_object_add( canvas->obj() );
+
init( name ? name : filename );
-
+ engineInit(module_filename);
setFile( filename );
move( x, y );
resize( width, height );
}
+void EvasEmotion::engineInit (const char * module_filename) {
+ if (!emotion_object_init(o, module_filename))
+ return;
+}
+
void EvasEmotion::setFile( const char* filename )
{
- emotion_object_file_set( o, filename );
+ emotion_object_file_set( o, filename );
}
void EvasEmotion::setPlay( bool b )
--- eflpp_emotion.h 2008-06-25 13:33:33.000000000 +0200
+++ eflpp_emotion_js.h 2008-06-25 13:25:15.000000000 +0200
@@ -24,13 +24,21 @@
class EvasEmotion : public EvasObject
{
public:
- EvasEmotion( EvasCanvas* canvas, const char* name = 0 );
- EvasEmotion( const char* filename, EvasCanvas* canvas, const char* name = 0 );
- EvasEmotion( int x, int y, const char* filename, EvasCanvas* canvas, const char* name = 0 );
- EvasEmotion( int x, int y, int width, int height, const char* filename, EvasCanvas* canvas, const char* name = 0 );
+ EvasEmotion( const char * module_filename, EvasCanvas* canvas, const char* name = 0 );
+ EvasEmotion( const char* filename, const char * module_filename, EvasCanvas* canvas, const char* name = 0 );
+ EvasEmotion( int x, int y, const char* filename, const char * module_filename, EvasCanvas* canvas, const char* name = 0 );
+ EvasEmotion( int x, int y, int width, int height, const char* filename,
+ const char * module_filename, EvasCanvas* canvas, const char* name = 0 );
//EvasEmotion( Evas_Object* object, EvasCanvas* canvas, const char* name = 0 );
~EvasEmotion();
-
+
+ /**
+ * Initialize video engine to either use xine or gstreamer
+ *
+ * @param module_filename name of viedo engine to be used
+ */
+ void engineInit(const char * module_filename);
+
void setFile( const char* filename );
void setPlay( bool b );
void setSmoothScale( bool b );
--- main.cpp 2008-06-25 13:31:14.000000000 +0200
+++ main_js.cpp 2008-06-25 13:17:25.000000000 +0200
@@ -21,15 +21,15 @@
cerr << "Usage: " << argv[0] << "<video file>" << endl;
return 1;
}
-
/* Create the main window, a window with an embedded canvas */
EcoreEvasWindowSoftwareX11* mw = new EcoreEvasWindowSoftwareX11( WIDTH, HEIGHT );
EvasCanvas* evas = mw->canvas();
evas->appendFontPath( PACKAGE_DATA_DIR "/fonts" );
- /* Add some objects to the canvas */
- EvasEmotion* emotion = new EvasEmotion( 0, 0, 320, 240, argv[1], evas );
+ /* Create EvasEmotion object using xine engine */
+ EvasEmotion* emotion = new EvasEmotion( 0, 0, 320, 240, argv[1], "xine", evas );
emotion->setSmoothScale( 1 );
+
emotion->setPlay( true );
emotion->show();
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel