nudge = AV_NOPTS_VALUE;
seek_pos = curr_pos = 0;
seeked = 1; eof = 0;
- index_markers = 0;
reading = writing = 0;
flushed = 0;
need_packet = 1;
// default ffmpeg native seek
int npkts = 1;
int64_t pos = no, plmt = -1;
+ IndexMarks *index_markers = get_markers();
if( index_markers && index_markers->size() > 1 ) {
IndexMarks &marks = *index_markers;
int i = marks.find(pos);
void FFAudioStream::load_markers()
{
IndexState *index_state = ffmpeg->file_base->asset->index_state;
- if( index_state->marker_status == MARKERS_NOTTESTED ) return;
if( !index_state || idx >= index_state->audio_markers.size() ) return;
+ if( index_state->marker_status == MARKERS_NOTTESTED ) return;
FFStream::load_markers(*index_state->audio_markers[idx], sample_rate);
}
+IndexMarks *FFAudioStream::get_markers()
+{
+ IndexState *index_state = ffmpeg->file_base->asset->index_state;
+ if( !index_state || idx >= index_state->audio_markers.size() ) return 0;
+ return index_state->audio_markers[idx];
+}
+
FFVideoStream::FFVideoStream(FFMPEG *ffmpeg, AVStream *strm, int idx, int fidx)
: FFStream(ffmpeg, strm, fidx)
{
void FFVideoStream::load_markers()
{
IndexState *index_state = ffmpeg->file_base->asset->index_state;
- if( idx >= index_state->video_markers.size() ) return;
+ if( !index_state || idx >= index_state->video_markers.size() ) return;
FFStream::load_markers(*index_state->video_markers[idx], frame_rate);
}
+IndexMarks *FFVideoStream::get_markers()
+{
+ IndexState *index_state = ffmpeg->file_base->asset->index_state;
+ if( !index_state || idx >= index_state->video_markers.size() ) return 0;
+ return !index_state ? 0 : index_state->video_markers[idx];
+}
+
FFMPEG::FFMPEG(FileBase *file_base)
{
void FFStream::load_markers(IndexMarks &marks, double rate)
{
- index_markers = &marks;
int in = 0;
int64_t sz = marks.size();
int max_entries = fmt_ctx->max_index_size / sizeof(AVIndexEntry) - 1;
virtual int create_filter(const char *filter_spec,
AVCodecContext *src_ctx, AVCodecContext *sink_ctx) = 0;
virtual void load_markers() = 0;
+ virtual IndexMarks *get_markers() = 0;
int create_filter(const char *filter_spec);
int load_filter(AVFrame *frame);
int read_filter(AVFrame *frame);
int frm_count;
List<FFrame> frms;
Mutex *frm_lock;
- IndexMarks *index_markers;
int64_t nudge;
int64_t seek_pos, curr_pos;
int create_filter(const char *filter_spec,
AVCodecContext *src_ctx, AVCodecContext *sink_ctx);
void load_markers();
+ IndexMarks *get_markers();
int encode_activate();
int nb_samples();
int create_filter(const char *filter_spec,
AVCodecContext *src_ctx, AVCodecContext *sink_ctx);
void load_markers();
+ IndexMarks *get_markers();
int init_frame(AVFrame *picture);
int load(VFrame *vframe, int64_t pos);
void MWindow::quit(int unlock)
{
- stop_playback(1);
if(unlock) gui->unlock_window();
+ stop_playback(1);
brender_lock->lock("MWindow::quit");
delete brender; brender = 0;
int x,
int y)
: BC_Window(_(PROGRAM_NAME ": Resize Track"),
- x - 320 / 2,
- y - get_resources()->ok_images[0]->get_h() + 100 / 2,
- 340,
- get_resources()->ok_images[0]->get_h() + 100,
- 340,
- get_resources()->ok_images[0]->get_h() + 100,
- 0,
- 0,
- 1)
+ x - 320 / 2, y - get_resources()->ok_images[0]->get_h() + 100 / 2,
+ 400, get_resources()->ok_images[0]->get_h() + 100,
+ 400, get_resources()->ok_images[0]->get_h() + 100,
+ 0, 0, 1)
{
this->mwindow = mwindow;
this->thread = thread;
int x = 10, y = 10;
lock_window("ResizeVTrackWindow::create_objects");
- add_subwindow(new BC_Title(x, y, _("Size:")));
- x += 50;
- add_subwindow(w = new ResizeVTrackWidth(this,
- thread,
- x,
- y));
- x += w->get_w() + 10;
- add_subwindow(new BC_Title(x, y, _("x")));
- x += 15;
- add_subwindow(h = new ResizeVTrackHeight(this,
- thread,
- x,
- y));
- x += h->get_w() + 5;
+ BC_Title *size_title = new BC_Title(x, y, _("Size:"));
+ add_subwindow(size_title);
+ int x1 = x + size_title->get_w();
+ int y1 = y + size_title->get_h() + 10;
+ BC_Title *scale_title = new BC_Title(x, y1, _("Scale:"));
+ add_subwindow(scale_title);
+ int x2 = x + scale_title->get_w();
+ if( x2 > x1 ) x1 = x2;
+ x1 += 10;
+ add_subwindow(w = new ResizeVTrackWidth(this, thread, x1, y));
+ x2 = x1 + w->get_w() + 5;
+ BC_Title *xy = new BC_Title(x2, y, _("x"));
+ add_subwindow(xy);
+ int x3 = x2 + xy->get_w() + 5;
+ add_subwindow(h = new ResizeVTrackHeight(this, thread, x3, y));
+ x = x3 + h->get_w() + 5;
FrameSizePulldown *pulldown;
- add_subwindow(pulldown = new FrameSizePulldown(mwindow->theme,
- w,
- h,
- x,
- y));
+ add_subwindow(pulldown = new FrameSizePulldown(mwindow->theme, w, h, x, y));
x += pulldown->get_w() + 5;
add_subwindow(new ResizeVTrackSwap(this, thread, x, y));
-
- y += 30;
- x = 10;
- add_subwindow(new BC_Title(x, y, _("Scale:")));
- x += 50;
- add_subwindow(w_scale = new ResizeVTrackScaleW(this,
- thread,
- x,
- y));
- x += 100;
- add_subwindow(new BC_Title(x, y, _("x")));
- x += 15;
- add_subwindow(h_scale = new ResizeVTrackScaleH(this,
- thread,
- x,
- y));
+ add_subwindow(w_scale = new ResizeVTrackScaleW(this, thread, x1, y1));
+ add_subwindow(new BC_Title(x2, y1, _("x")));
+ add_subwindow(h_scale = new ResizeVTrackScaleH(this, thread, x3, y1));
add_subwindow(new BC_OKButton(this));
add_subwindow(new BC_CancelButton(this));
LION
# voice directory in festival/lib/voices/us/
-voice: cmu_us_bdl_arctic_hts
+voice: cmu_us_slt_arctic_hts
# path to model file
model: lion01
HEROINE
-voice: nitech_us_clb_arctic_hts
+voice: nitech_us_slt_arctic_hts
model: warrior01
// Lowest right icon coordinate.
current_icon_x = item->icon_x;
if(current_icon_x > *icon_x) *icon_x = current_icon_x;
- if(current_icon_x + get_item_w(item) > *next_icon_x)
+ if(current_icon_x + get_item_w(item) > *next_icon_x) {
*next_icon_x = current_icon_x + get_item_w(item);
-
+ *next_icon_y = 0;
+ }
current_icon_y = item->icon_y + get_item_h(item);
if(current_icon_y > *next_icon_y)
*next_icon_y = current_icon_y;
if(do_text)
{
+ float pos = position > length ? (float)1 :
+ length > 0 && position > 0 ? (float)position / length :
+ (float)0;
set_font(MEDIUMFONT);
set_color(get_resources()->progress_text); // draw decimal percentage
- sprintf(string, "%d%%", (int)(100 * (float)position / length + 0.5 / w));
+ sprintf(string, "%d%%", (int)(100 * pos + 0.5f));
draw_center_text(w / 2, h / 2 + get_text_ascent(MEDIUMFONT) / 2, string);
}
flash(flush);
MotionWindow::MotionWindow(MotionMain *plugin)
- : PluginClientWindow(plugin,
- 600,
- 650,
- 600,
- 650,
- 0)
+ : PluginClientWindow(plugin, 600, 650, 600, 650, 0)
{
this->plugin = plugin;
}
pitch = new TitlePitch(client, this, x1, y2+10, &client->config.line_pitch);
pitch->create_objects();
x = x2 + size_tumbler->get_w() + margin;
+ int y3 = pitch->get_y() + pitch->get_h();
add_tool(style_title = new BC_Title(x, y, _("Style:")));
add_tool(italic = new TitleItalic(client, this, x, y + 20));
add_tool(mid = new TitleMid(client, this, x, y + 50));
add_tool(bottom= new TitleBottom(client, this, x, y + 80));
- y += 50;
x = 10;
+ y = y3;
add_tool(x_title = new BC_Title(x, y, _("X:")));
title_x = new TitleX(client, this, x, y + 20);