summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaromil <jaromil@dyne.org>2016-04-07 20:46:21 (GMT)
committer Jaromil <jaromil@dyne.org>2016-04-07 20:47:30 (GMT)
commite8e2eb5f3447f569505e9317d119894d112d24c4 (patch)
tree1efe9d4ba7fec3262586408bf1d8a3736bd878b7
parentaa73398f752ced835d57e3012866512d55de252d (diff)
deactivated video_layer and minor fix to compileHEADmaster
-rw-r--r--configure.ac2
-rw-r--r--src/Makefile.am3
-rw-r--r--src/include/video_layer.h12
-rw-r--r--src/jsparser.cpp88
4 files changed, 52 insertions, 53 deletions
diff --git a/configure.ac b/configure.ac
index 9131f85..270d3f5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -884,7 +884,7 @@ dnl ==============================================================
#
# freeframe should be supported in any case:
# plugins will be detected runtime
-# freeframe.h header is redistributed
+# freeframe.h header is redistributed
# this is a normal behaviour for plugins
# support should be compiled in even if plugins aren't present.
# -xnt
diff --git a/src/Makefile.am b/src/Makefile.am
index 42bebb6..6b90248 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -22,7 +22,7 @@ SOURCES = \
\
tvfreq.c unicap_layer.cpp \
v4l2_layer.cpp \
- video_layer.cpp image_layer.cpp \
+ image_layer.cpp \
text_layer.cpp generator_layer.cpp \
geo_layer.cpp flash_layer.cpp \
xscreensaver_layer.cpp \
@@ -57,7 +57,6 @@ JS_SOURCES = context_js.cpp \
callbacks_js.cpp \
video_encoder_js.cpp \
cam_layer_js.cpp \
- video_layer_js.cpp \
image_layer_js.cpp \
text_layer_js.cpp \
geo_layer_js.cpp \
diff --git a/src/include/video_layer.h b/src/include/video_layer.h
index 37ddea9..a89a4a0 100644
--- a/src/include/video_layer.h
+++ b/src/include/video_layer.h
@@ -2,7 +2,7 @@
* (c) Copyright 2001 Silvano Galliani aka kysucix <silvano.galliani@poste.it>
*
* This source code is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Public License as published
+ * modify it under the terms of the GNU Public License as published
* by the Free Software Foundation; either version 2 of the License,
* or (at your option) any later version.
*
@@ -22,7 +22,7 @@
#include <config.h>
#include <inttypes.h>
-#define UINT64_C uint64_t
+// #define UINT64_C uint64_t
extern "C" {
#ifdef HAVE_LIBAVCODEC_AVCODEC_H
# include <libavcodec/avcodec.h>
@@ -66,7 +66,7 @@ class VideoLayer: public Layer {
public:
VideoLayer();
~VideoLayer();
-
+
bool open(const char *file);
void *feed();
@@ -92,7 +92,7 @@ class VideoLayer: public Layer {
protected:
bool _init();
- private:
+ private:
/**
* av(codec|format) aka ffmpeg related variables
*/
@@ -104,7 +104,7 @@ class VideoLayer: public Layer {
AVPacket pkt;
- AVCodecContext *video_codec_ctx;
+ AVCodecContext *video_codec_ctx;
AVCodec *video_codec;
AVCodecContext *audio_codec_ctx;
@@ -184,7 +184,7 @@ class VideoLayer: public Layer {
// quick hack for EOS callback
DumbCallback *eos;
-
+
// allow to use Factory on this class
FACTORY_ALLOWED
};
diff --git a/src/jsparser.cpp b/src/jsparser.cpp
index 07aec05..613d5da 100644
--- a/src/jsparser.cpp
+++ b/src/jsparser.cpp
@@ -5,7 +5,7 @@
* Copyright (C) 2010 Andrea Guzzo <xant@dyne.org>
*
* This source code is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Public License as published
+ * modify it under the terms of the GNU Public License as published
* by the Free Software Foundation; either version 3 of the License,
* or (at your option) any later version.
*
@@ -53,7 +53,7 @@ JsExecutionContext::JsExecutionContext(JsParser *jsParser)
error("JsParser :: error creating runtime");
return; /* XXX should return int or ptr! */
}
-
+
/* Create a new context. */
cx = JS_NewContext(rt, STACK_CHUNK_SIZE);
/* if global_context does not have a value, end the program here */
@@ -61,24 +61,24 @@ JsExecutionContext::JsExecutionContext(JsParser *jsParser)
error("JsParser :: error creating context");
return;
}
-
+
JS_BeginRequest(cx);
// Store a reference to ourselves in the context ...
JS_SetContextPrivate(cx, parser);
-
+
/* Set a more strict error checking */
JS_SetOptions(cx, JSOPTION_VAROBJFIX); // | JSOPTION_STRICT);
-
+
/* Set the branch callback */
#if defined JSOPTION_NATIVE_BRANCH_CALLBACK
JS_SetBranchCallback(cx, js_static_branch_callback);
#else
JS_SetOperationCallback(cx, js_static_branch_callback);
#endif
-
+
/* Set the error reporter */
JS_SetErrorReporter(cx, js_error_reporter);
-
+
/* Create the global object here */
// JS_SetGlobalObject(global_context, global_object);
// this is done in init_class / JS_InitStandardClasses.
@@ -86,9 +86,9 @@ JsExecutionContext::JsExecutionContext(JsParser *jsParser)
init_class();
JS_EndRequest(cx);
// deassociate this context from the creating thread
- // so that it can be used in other threads
- // https://developer.mozilla.org/en/SpiderMonkey/JSAPI_Reference/JS_NewContext
- JS_ClearContextThread(cx);
+ // so that it can be used in other threads
+ // https://developer.mozilla.org/en/SpiderMonkey/JSAPI_Reference/JS_NewContext
+ JS_ClearContextThread(cx);
/** register SIGINT signal */
// signal(SIGINT, js_sigint_handler);
}
@@ -113,22 +113,22 @@ void JsExecutionContext::gc()
}
void JsExecutionContext::init_class() {
-
- /* Initialize the built-in JS objects and the global object
+
+ /* Initialize the built-in JS objects and the global object
* As a side effect, JS_InitStandardClasses establishes obj as
* the global object for cx, if one is not already established. */
JS_InitStandardClasses(cx, obj);
-
+
/* Declare shell functions */
if (!JS_DefineFunctions(cx, obj, global_functions)) {
JS_EndRequest(cx);
error("JsParser :: error defining global functions");
return ;
}
-
+
///////////////////////////////////////////////////////////
// Initialize classes
-
+
JSObject *object_proto; // reminder for inher.
JSObject *layer_object; // used in REGISTER_CLASS macro
// Screen (in C++ ViewPort) has only one class type
@@ -210,14 +210,14 @@ void JsExecutionContext::init_class() {
cam_layer_methods,
object_proto);
-#ifdef WITH_FFMPEG
- REGISTER_CLASS("MovieLayer",
- video_layer_class,
- video_layer_constructor,
- NULL, // properties
- video_layer_methods,
- object_proto);
-#endif
+// #ifdef WITH_FFMPEG
+// REGISTER_CLASS("MovieLayer",
+// video_layer_class,
+// video_layer_constructor,
+// NULL, // properties
+// video_layer_methods,
+// object_proto);
+// #endif
#ifdef WITH_AVIFILE
REGISTER_CLASS("MovieLayer",
@@ -245,7 +245,7 @@ void JsExecutionContext::init_class() {
NULL, // properties
js_xgrab_methods,
object_proto);
-#endif
+#endif
#ifdef WITH_CAIRO
REGISTER_CLASS("VectorLayer",
@@ -254,7 +254,7 @@ void JsExecutionContext::init_class() {
vector_layer_properties,
vector_layer_methods,
object_proto);
-#endif
+#endif
REGISTER_CLASS("Filter",
filter_class,
@@ -341,7 +341,7 @@ void JsExecutionContext::init_class() {
js_vid_enc_methods,
NULL);
#endif
-
+
//JS_DefineProperties(global_context, layer_object, layer_properties);
return;
}
@@ -374,27 +374,27 @@ void JsParser::gc() {
void JsParser::init() {
//JSBool ret;
stop_script=false;
-
+
notice("Initializing %s", JS_GetImplementationVersion());
// create a global execution context (used to evaluate commands on the fly
// and for other internal operations
global_runtime = new JsExecutionContext(this);
-
+
/* Create a new runtime environment. */
js_runtime = global_runtime->rt; // XXX - for retrocompatibilty
if (!js_runtime) {
return ; /* XXX should return int or ptr! */
}
-
+
/* Create a new context. */
global_context = global_runtime->cx; // XXX - for retrocompatibilty
-
+
/* if global_context does not have a value, end the program here */
if (global_context == NULL) {
return ;
}
-
+
global_object = global_runtime->obj;
/** register SIGINT signal */
// signal(SIGINT, js_sigint_handler);
@@ -418,12 +418,12 @@ int JsParser::include(JSContext *cx, const char* jscript) {
error("locations checked: current and %s/%s",
PREFIX,debian_path);
error("javascript include('%s') failed", jscript);
-
+
return res;
} else
func("included file %s",temp);
}
-
+
fclose(fd);
JS_BeginRequest(cx);
@@ -434,24 +434,24 @@ int JsParser::include(JSContext *cx, const char* jscript) {
return false;
}
- res = this->open(cx, gobj, temp);
+ res = this->open(cx, gobj, temp);
JS_EndRequest(cx);
-
+
if (!res) {
// all errors already reported,
// js->open talks a lot
error("JS include('%s') failed", jscript);
return res;
}
-
+
func("JS: included %s", jscript);
return res;
}
/* return lines read, or 0 on error */
int JsParser::open(const char* script_file) {
-
+
JsExecutionContext *new_script = new JsExecutionContext(this);
JS_SetContextThread(new_script->cx);
JS_BeginRequest(new_script->cx);
@@ -531,7 +531,7 @@ int JsParser::use(JSContext *cx, JSObject *obj, const char* script_file) {
return 0;
}
JS_BeginRequest(cx);
-
+
/* TODO -- FIX
// use a clean obj and put freej inside
scriptObject = JS_NewObject(cx, &UseScriptClass, NULL, NULL);
@@ -610,7 +610,7 @@ int JsParser::parse(const char *command) {
JsExecutionContext *new_script = new JsExecutionContext(this);
JS_SetContextThread(new_script->cx);
JS_BeginRequest(new_script->cx);
- eval_res = evaluate(new_script->cx, new_script->obj,
+ eval_res = evaluate(new_script->cx, new_script->obj,
(const char*)"parsed command", command, strlen(command));
JS_EndRequest(new_script->cx);
JS_ClearContextThread(new_script->cx);
@@ -658,7 +658,7 @@ char* JsParser::readFile(FILE *file, int *len){
int JsParser::reset() {
JSContext *cx = NULL;
int i = 0;
-
+
JsExecutionContext *ecx = runtimes.begin();
while (ecx) {
delete ecx;
@@ -668,7 +668,7 @@ int JsParser::reset() {
return i;
}
-int JsParser::evaluate(JSContext *cx, JSObject *obj,
+int JsParser::evaluate(JSContext *cx, JSObject *obj,
const char *name, const char *buf, unsigned int len) {
jsval res;
unsigned int lineno;
@@ -728,7 +728,7 @@ void js_debug_property(JSContext *cx, jsval vp) {
func(" double is %.4f",num);
}
break;
-
+
case 0x4:
{
char *cap = NULL;
@@ -799,7 +799,7 @@ void js_debug_argument(JSContext *cx, jsval vp) {
func(" Double [ %.2f ]", num);
}
break;
-
+
case 0x4:
{
char *cap;
@@ -812,7 +812,7 @@ void js_debug_argument(JSContext *cx, jsval vp) {
}
}
break;
-
+
case 0x6:
{
bool b = false;