Hit the wall trying to pass variable from one class to another
I tried to pass variable into class BD_BatchRenderJob : public BatchRenderJob { public: static int get_udfs_mount(char *udfs, char *mopts, char *mntpt) ; BD_BatchRenderJob(Preferences *preferences, int labeled, int fa rmed); char *create_script(EDL *edl, ArrayList<Indexable *> *idxbls); int tsmuxered; }; from class CreateBD_Thread : public BC_DialogThread { static const int64_t BD_SIZE; static const int BD_STREAMS, BD_WIDTH, BD_HEIGHT; static const double BD_ASPECT_WIDTH, BD_ASPECT_HEIGHT; static const double BD_WIDE_ASPECT_WIDTH, BD_WIDE_ASPECT_HEIGHT ; static const int BD_MAX_BITRATE, BD_CHANNELS, BD_WIDE_CHANNELS; static const double BD_FRAMERATE, BD_SAMPLERATE, BD_KAUDIO_RATE ; static const int BD_INTERLACE_MODE; public: CreateBD_Thread(MWindow *mwindow); ~CreateBD_Thread(); void handle_close_event(int result); BC_Window* new_gui(); int option_presets(); int create_bd_script(const char *path, EDL *edl); int create_bd_jobs(ArrayList<BatchRenderJob*> *jobs, const char *asset_dir); int insert_video_plugin(const char *title, KeyFrame *default_ke yframe); int resize_tracks(); MWindow *mwindow; CreateBD_GUI *gui; char asset_title[BCTEXTLEN]; char tmp_path[BCTEXTLEN]; char use_profile[BCTEXTLEN]; int use_deinterlace, use_inverse_telecine; int use_scale, use_resize_tracks; int use_wide_audio, use_farmed; int use_histogram, use_labeled; int use_standard; int use_tsmuxer; int64_t bd_size; int bd_width; int bd_height; double bd_aspect_width; double bd_aspect_height; double bd_framerate; int bd_samplerate; int bd_max_bitrate; double bd_kaudio_rate; int bd_interlace_mode; int max_w, max_h; BD_BatchRenderJob *batchrender; }; but guess I do something wrong because just calling //batchrender->tsmuxered = use_tsmuxer; form void CreateBD_Thread::handle_close_event(int result) result in crash ( NOT WORKING (as far as this functionality is concerned) patchset attached...
different idea: output bd.meta conditionally on gui var (set from checkbox), let sh script test for its existence, run tsmuxer conditionally.. seems to work! On Friday, December 17, 2021, Andrew Randrianasulu <randrianasulu@gmail.com> wrote:
I tried to pass variable into
class BD_BatchRenderJob : public BatchRenderJob { public: static int get_udfs_mount(char *udfs, char *mopts, char *mntpt) ; BD_BatchRenderJob(Preferences *preferences, int labeled, int fa rmed); char *create_script(EDL *edl, ArrayList<Indexable *> *idxbls); int tsmuxered; };
from
class CreateBD_Thread : public BC_DialogThread { static const int64_t BD_SIZE; static const int BD_STREAMS, BD_WIDTH, BD_HEIGHT; static const double BD_ASPECT_WIDTH, BD_ASPECT_HEIGHT; static const double BD_WIDE_ASPECT_WIDTH, BD_WIDE_ASPECT_HEIGHT ; static const int BD_MAX_BITRATE, BD_CHANNELS, BD_WIDE_CHANNELS; static const double BD_FRAMERATE, BD_SAMPLERATE, BD_KAUDIO_RATE ; static const int BD_INTERLACE_MODE; public: CreateBD_Thread(MWindow *mwindow); ~CreateBD_Thread(); void handle_close_event(int result); BC_Window* new_gui(); int option_presets(); int create_bd_script(const char *path, EDL *edl); int create_bd_jobs(ArrayList<BatchRenderJob*> *jobs, const char *asset_dir); int insert_video_plugin(const char *title, KeyFrame *default_ke yframe); int resize_tracks();
MWindow *mwindow; CreateBD_GUI *gui; char asset_title[BCTEXTLEN]; char tmp_path[BCTEXTLEN]; char use_profile[BCTEXTLEN]; int use_deinterlace, use_inverse_telecine; int use_scale, use_resize_tracks; int use_wide_audio, use_farmed; int use_histogram, use_labeled; int use_standard; int use_tsmuxer;
int64_t bd_size; int bd_width; int bd_height; double bd_aspect_width; double bd_aspect_height; double bd_framerate; int bd_samplerate; int bd_max_bitrate; double bd_kaudio_rate; int bd_interlace_mode; int max_w, max_h;
BD_BatchRenderJob *batchrender; };
but guess I do something wrong because just calling //batchrender->tsmuxered = use_tsmuxer;
form
void CreateBD_Thread::handle_close_event(int result)
result in crash (
NOT WORKING (as far as this functionality is concerned) patchset attached...
participants (1)
-
Andrew Randrianasulu