X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;ds=sidebyside;f=cinelerra-5.1%2Fcinelerra%2Fconvert.h;h=41c125c9b6977626b24f9cc1867ebe0cdb17743b;hb=HEAD;hp=a1de04b8bb28c41b7389ddf63fb69cb1c16b25be;hpb=03fa86e6dc495f9444ae14dad401b1ad6de793fe;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/cinelerra/convert.h b/cinelerra-5.1/cinelerra/convert.h index a1de04b8..53463205 100644 --- a/cinelerra-5.1/cinelerra/convert.h +++ b/cinelerra-5.1/cinelerra/convert.h @@ -1,3 +1,23 @@ +/* + * CINELERRA + * Copyright (C) 2008 Adam Williams + * + * 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + #ifndef __CONVERT_H__ #define __CONVERT_H__ @@ -39,7 +59,7 @@ class ConvertRender : public Thread { public: - ConvertRender(MWindow *mwindow, const char *suffix); + ConvertRender(MWindow *mwindow); ~ConvertRender(); void reset(); void to_convert_path(char *new_path, Indexable *idxbl); @@ -50,6 +70,10 @@ public: ArrayList needed_idxbls; // originals which match the needed_assets ArrayList needed_copies; // assets which must be created + double get_video_length(Indexable *idxbl); + double get_audio_length(Indexable *idxbl); + double get_length(Indexable *idxbl); + int match_format(Asset *asset); EDL *convert_edl(EDL *edl, Indexable *idxbl); // create render edl for this indexable int add_original(EDL *edl, Indexable *idxbl); void add_needed(Indexable *idxbl, Asset *convert); @@ -57,7 +81,7 @@ public: // if user canceled progress bar int is_canceled(); - void set_format(Asset *asset); + void set_format(Asset *asset, const char *suffix, int to_proxy); void start_convert(float beep, int remove_originals); void run(); void create_copy(int i); @@ -70,11 +94,13 @@ public: MainProgressBar *progress; ConvertProgress *convert_progress; Timer *progress_timer; + ConvertPackageRenderer *renderer; Mutex *counter_lock; int total_rendered, remove_originals; int failed, canceled, result; float beep; + int to_proxy; }; class ConvertMenuItem : public BC_MenuItem @@ -121,6 +147,17 @@ public: ConvertWindow *gui; }; +class ConvertToProxyPath : public BC_CheckBox +{ +public: + ConvertToProxyPath(ConvertWindow *gui, int x, int y); + ~ConvertToProxyPath(); + + int handle_event(); + + ConvertWindow *gui; +}; + class ConvertBeepOnDone : public BC_FPot { public: @@ -135,7 +172,7 @@ class ConvertPackageRenderer : public PackageRenderer { public: ConvertPackageRenderer(ConvertRender *render); - ~ConvertPackageRenderer(); + virtual ~ConvertPackageRenderer(); int get_master(); int get_result(); @@ -174,6 +211,7 @@ public: ConvertSuffixText *suffix_text; ConvertFormatTools *format_tools; ConvertRemoveOriginals *remove_originals; + ConvertToProxyPath *to_proxy_path; ConvertBeepOnDone *beep_on_done; }; @@ -198,26 +236,7 @@ public: int orig_w, orig_h; int remove_originals; float beep; -}; - -class ConvertBeep : public Thread -{ -public: - enum { BEEP_SAMPLE_RATE=48000 }; - typedef int16_t audio_data_t; - ConvertBeep(MWindow *mwindow); - ~ConvertBeep(); - - void run(); - void start(); - void stop(int wait); - void tone(double freq, double secs, double gain); - - MWindow *mwindow; - double freq, secs, gain; - AudioDevice *audio; - int playing_audio, interrupted; - int audio_pos; + int to_proxy; }; #endif