Credit Andrea improved comments in render format
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / fileac3.C
index 25276864175dcb471397a418481df9fd626ddacd..dd3b4536d0d0997ba90001474ead3f520e828123 100644 (file)
@@ -2,6 +2,7 @@
 /*
  * CINELERRA
  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
+ * Copyright (C) 2003-2016 Cinelerra CV contributors
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -18,7 +19,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  */
-
+#ifdef HAVE_LIBZMPEG
 #include <stdio.h>
 #include <stdint.h>
 #include <stdlib.h>
@@ -59,8 +60,8 @@ FileAC3::FileAC3(Asset *asset, File *file)
 
 FileAC3::~FileAC3()
 {
-       if( mpg_file ) delete mpg_file;
        close_file();
+       delete mpg_file;
 }
 
 int FileAC3::reset_parameters_derived()
@@ -341,39 +342,29 @@ int FileAC3::write_samples(double **buffer, int64_t len)
 }
 
 
-
-
-
-
-
 AC3ConfigAudio::AC3ConfigAudio(BC_WindowBase *parent_window,
        Asset *asset)
  : BC_Window(_(PROGRAM_NAME ": Audio Compression"),
        parent_window->get_abs_cursor_x(1),
        parent_window->get_abs_cursor_y(1),
-       500,
-       BC_OKButton::calculate_h() + 100,
-       500,
-       BC_OKButton::calculate_h() + 100,
-       0,
-       0,
-       1)
+       xS(500), BC_OKButton::calculate_h() + yS(100),
+       xS(500), BC_OKButton::calculate_h() + yS(100),
+       0, 0, 1)
 {
        this->parent_window = parent_window;
        this->asset = asset;
+// *** CONTEXT_HELP ***
+       context_help_set_keyword("Single File Rendering");
 }
 
 void AC3ConfigAudio::create_objects()
 {
-       int x = 10, y = 10;
-       int x1 = 150;
+       int x = xS(10), y = yS(10);
+       int x1 = xS(150);
        lock_window("AC3ConfigAudio::create_objects");
        add_tool(new BC_Title(x, y, _("Bitrate (kbps):")));
        AC3ConfigAudioBitrate *bitrate;
-       add_tool(bitrate =
-               new AC3ConfigAudioBitrate(this,
-                       x1,
-                       y));
+       add_tool(bitrate = new AC3ConfigAudioBitrate(this, x1, y));
        bitrate->create_objects();
 
        add_subwindow(new BC_OKButton(this));
@@ -388,16 +379,8 @@ int AC3ConfigAudio::close_event()
 }
 
 
-
-
-
-
-AC3ConfigAudioBitrate::AC3ConfigAudioBitrate(AC3ConfigAudio *gui,
-       int x,
-       int y)
- : BC_PopupMenu(x,
-       y,
-       150,
+AC3ConfigAudioBitrate::AC3ConfigAudioBitrate(AC3ConfigAudio *gui, int x, int y)
+ : BC_PopupMenu(x, y, xS(150),
        AC3ConfigAudioBitrate::bitrate_to_string(gui->string, gui->asset->ac3_bitrate))
 {
        this->gui = gui;
@@ -439,3 +422,4 @@ int AC3ConfigAudioBitrate::handle_event()
 }
 
 #endif
+#endif //libzmpeg