summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Auras <yak54@gmx.net>2011-02-27 13:25:43 +0100
committerAndreas Auras <yak54@gmx.net>2011-02-27 13:25:43 +0100
commit0ea66094d3dec6dedb8b7e551f6753c0553d2e4c (patch)
tree12772444245da20c8bf4ecfa52ced7caf1ce7e1b
parent63a5fceccdb4b4ea89af764fd02ce0476458150a (diff)
downloadxine-lib-atmolight-0ea66094d3dec6dedb8b7e551f6753c0553d2e4c.tar.gz
xine-lib-atmolight-0ea66094d3dec6dedb8b7e551f6753c0553d2e4c.tar.bz2
Added support for df-xine-lib-extensions patch
-rw-r--r--.cproject5
-rw-r--r--.project2
-rw-r--r--xine_post_atmo.c32
3 files changed, 32 insertions, 7 deletions
diff --git a/.cproject b/.cproject
index 3e3e00d..8050861 100644
--- a/.cproject
+++ b/.cproject
@@ -15,11 +15,11 @@
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
-<configuration artifactName="atmo" buildProperties="" id="cdt.managedbuild.toolchain.gnu.base.522923725" name="Linux GCC" parent="org.eclipse.cdt.build.core.emptycfg">
+<configuration artifactName="atmo" buildProperties="" description="" id="cdt.managedbuild.toolchain.gnu.base.522923725" name="Linux GCC" parent="org.eclipse.cdt.build.core.emptycfg">
<folderInfo id="cdt.managedbuild.toolchain.gnu.base.522923725.1299807297" name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.base.1765852131" name="cdt.managedbuild.toolchain.gnu.base" superClass="cdt.managedbuild.toolchain.gnu.base">
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.target.gnu.platform.base.1949347644" name="Debug Platform" osList="linux,hpux,aix,qnx" superClass="cdt.managedbuild.target.gnu.platform.base"/>
-<builder id="cdt.managedbuild.target.gnu.builder.base.1108692234" managedBuildOn="false" name="Gnu Make Builder.Linux GCC" superClass="cdt.managedbuild.target.gnu.builder.base"/>
+<builder id="cdt.managedbuild.target.gnu.builder.base.1108692234" incrementalBuildTarget="install" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.base"/>
<tool id="cdt.managedbuild.tool.gnu.archiver.base.1982832721" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.2064905689" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base"/>
<tool id="cdt.managedbuild.tool.gnu.c.compiler.base.1226506188" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.base">
@@ -136,6 +136,7 @@
</target>
</buildTargets>
</storageModule>
+<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
diff --git a/.project b/.project
index 54774f4..91af348 100644
--- a/.project
+++ b/.project
@@ -51,7 +51,7 @@
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
- <value>all</value>
+ <value>install</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.stopOnError</key>
diff --git a/xine_post_atmo.c b/xine_post_atmo.c
index 12de7db..b421d99 100644
--- a/xine_post_atmo.c
+++ b/xine_post_atmo.c
@@ -758,7 +758,11 @@ static void *atmo_grab_loop (void *this_gen) {
post_video_port_t *port = this->port;
xine_video_port_t *video_port = port->original_port;
xine_ticket_t *ticket = this->post_plugin.running_ticket;
+#ifdef HAVE_XINE_VO_GRAB_FRAME
+ vo_grab_frame_t *frame = NULL;
+#else
xine_grab_frame_t *frame = NULL;
+#endif
int rc;
int grab_width, grab_height, analyze_width, analyze_height, overscan, img_size;
int last_analyze_width = 0, last_analyze_height = 0;
@@ -784,15 +788,26 @@ static void *atmo_grab_loop (void *this_gen) {
while (running) {
/* allocate grab frame */
- if (!frame && xine_port_send_gui_data(video_port, XINE_GUI_SEND_ALLOC_GRAB_FRAME, &frame)) {
- xine_log(this->post_plugin.xine, XINE_LOG_PLUGIN, "atmo: frame grabbing not supported by this video driver!\n");
- break;
+ if (!frame) {
+#ifdef HAVE_XINE_VO_GRAB_FRAME
+ frame = video_port->new_grab_frame(video_port);
+ if (!frame) {
+#else
+ if (xine_port_send_gui_data(video_port, XINE_GUI_SEND_ALLOC_GRAB_FRAME, &frame)) {
+#endif
+ xine_log(this->post_plugin.xine, XINE_LOG_PLUGIN, "atmo: frame grabbing not supported!\n");
+ break;
+ }
}
if (ticket->ticket_revoked) {
/* free grab frame */
if (frame) {
+#ifdef HAVE_XINE_VO_GRAB_FRAME
+ frame->dispose(frame);
+#else
xine_port_send_gui_data(video_port, XINE_GUI_SEND_FREE_GRAB_FRAME, frame);
+#endif
frame = NULL;
}
llprintf(LOG_1, "grab thread waiting for new ticket\n");
@@ -831,7 +846,11 @@ static void *atmo_grab_loop (void *this_gen) {
frame->continuous = 1;
frame->width = analyze_width;
frame->height = analyze_height;
+#ifdef HAVE_XINE_VO_GRAB_FRAME
+ if (!(rc = frame->grab_next_displayed_frame(frame))) {
+#else
if (!(rc = xine_port_send_gui_data(video_port, XINE_GUI_SEND_GRAB_FRAME, frame))) {
+#endif
if (frame->width == analyze_width && frame->height == analyze_height) {
img_size = analyze_width * analyze_height;
@@ -912,8 +931,13 @@ static void *atmo_grab_loop (void *this_gen) {
}
/* free grab frame */
- if (frame)
+ if (frame) {
+#ifdef HAVE_XINE_VO_GRAB_FRAME
+ frame->dispose(frame);
+#else
xine_port_send_gui_data(video_port, XINE_GUI_SEND_FREE_GRAB_FRAME, frame);
+#endif
+ }
ticket->release(ticket, 0);