Credit Andrew - fix vorbis audio which was scratchy and ensure aging plugin does...
[goodguy/cinelerra.git] / cinelerra-5.1 / plugins / titler / titler.C
index 28333d4ee70544ed96511e7698d4dfe454e4b295..b415781106b77ecf9164ffdc62d4941c0a09bae1 100644 (file)
 #include <stdint.h>
 #include <stdio.h>
 #include <string.h>
+#if defined (__linux__)
 #include <endian.h>
 #include <byteswap.h>
+#endif
+#if defined (__FreeBSD__)
+#include <sys/endian.h>
+#endif
 #include <iconv.h>
 #include <sys/stat.h>
 #include <fontconfig/fontconfig.h>
@@ -76,7 +81,7 @@ REGISTER_PLUGIN(TitleMain)
 #else
 #define DEFAULT_ENCODING "ISO8859-1"
 #endif
-#define DEFAULT_TIMECODEFORMAT TIME_HMS
+#define DEFAULT_TIMECODEFORMAT TIME_HMSF
 
 static inline int kw_strcmp(const char *ap, const char *bp) {
        return !strcmp(ap, bp) ? 0 : strcmp(ap,_(bp));
@@ -87,11 +92,11 @@ TitleConfig::TitleConfig()
        strcpy(font, "fixed");
        strcpy(encoding, DEFAULT_ENCODING);
        style = FONT_ALIAS;
-       size = 24;
-       color = BLACK;
+       size = 48;
+       color = WHITE;
        alpha = 0xff;
        outline_size = 0.;
-       outline_color = WHITE;
+       outline_color = RED;
        outline_alpha = 0xff;
        color_stroke = 0xff0000;
        stroke_width = 0.0;
@@ -110,7 +115,7 @@ TitleConfig::TitleConfig()
        next_keyframe_position = 0;
        prev_keyframe_position = 0;
        timecode = 0;
-       dropshadow = 2;
+       dropshadow = 0;
        background = 0;
        strcpy(background_path, "");
        timecode_format = DEFAULT_TIMECODEFORMAT;
@@ -1213,7 +1218,7 @@ Indexable *TitleMain::open_background(const char *filename)
        nested_edl->create_objects();
        nested_edl->set_path(filename);
        nested_edl->load_xml(&xml_file, LOAD_ALL);
-       TransportCommand command;
+       TransportCommand command(server->preferences);
        //command.command = audio_tracks ? NORMAL_FWD : CURRENT_FRAME;
        command.command = CURRENT_FRAME;
        command.get_edl()->copy_all(nested_edl);