return 0;
}
if( pos == curr_pos ) return 0;
+ if( !st->codec || !st->codec->codec ) return -1;
avcodec_flush_buffers(st->codec);
double secs = (double)pos / sample_rate;
int64_t tstmp = secs * st->time_base.den / st->time_base.num;
if( gop < 4 ) gop = 4;
if( gop > 64 ) gop = 64;
if( pos >= curr_pos && pos <= curr_pos + gop ) return 0;
+ if( !st->codec || !st->codec->codec ) return -1;
avcodec_flush_buffers(st->codec);
// back up a few frames to read up to current to help repair damages
if( (pos-=gop) < 0 ) pos = 0;
windowmenu->add_item(show_lwindow = new ShowLWindow(mwindow));
windowmenu->add_item(split_x = new SplitX(mwindow));
windowmenu->add_item(split_y = new SplitY(mwindow));
- windowmenu->add_item(new TileWindows(mwindow,_("Default positions"),-1));
+ windowmenu->add_item(new TileWindows(mwindow,_("Default positions"),-1,"Ctrl+d",'d'));
windowmenu->add_item(new TileWindows(mwindow,_("Tile left"),0));
windowmenu->add_item(new TileWindows(mwindow,_("Tile right"),1));
}
return 1;
}
-TileWindows::TileWindows(MWindow *mwindow, const char *item_title, int config)
- : BC_MenuItem(item_title)
+TileWindows::TileWindows(MWindow *mwindow, const char *item_title, int config,
+ const char *hot_keytext, int hot_key)
+ : BC_MenuItem(item_title, hot_keytext, hot_key)
{
this->mwindow = mwindow;
this->config = config;
+ if( hot_key ) set_ctrl(1);
}
int TileWindows::handle_event()
{
class TileWindows : public BC_MenuItem
{
public:
- TileWindows(MWindow *mwindow, const char *item_title, int config);
+ TileWindows(MWindow *mwindow, const char *item_title, int config,
+ const char *hot_keytext="", int hot_key=0);
int handle_event();
MWindow *mwindow;
int config;
$(OBJDIR)/bcdragwindow.o \
$(OBJDIR)/bcfilebox.o \
$(OBJDIR)/bcfontentry.o \
- $(OBJDIR)/bcwidgetgrid.o \
$(OBJDIR)/bclistbox.o \
$(OBJDIR)/bclistboxitem.o \
$(OBJDIR)/bchash.o \
$(OBJDIR)/bcprogress.o \
$(OBJDIR)/bcprogressbox.o \
$(OBJDIR)/bcrecentlist.o \
- $(OBJDIR)/bcrelocatablewidget.o \
$(OBJDIR)/bcrename.o \
$(OBJDIR)/bcrepeater.o \
$(OBJDIR)/bcresources.o \
int BC_FileBoxRecent::handle_event()
{
- if(get_selection(0, 0) >= 0) {
- filebox->submit_dir(get_selection(0, 0)->get_text());
+ BC_ListBoxItem *selection = get_selection(0, 0);
+ if( selection != 0 ) {
+ char *path = selection->get_text();
+ filebox->submit_dir(path);
}
return 1;
}
// is a directory, change directories
if(filebox->fs->is_dir(path))
{
- filebox->fs->change_dir(path);
- filebox->refresh();
- update(strcat(filebox->fs->get_current_dir(),"/"));
+ const char *cp = path;
+ char dir_path[BCTEXTLEN], *dp = dir_path;
+ while( *cp ) *dp++ = *cp++;
+ while( dp >= dir_path && *--dp == '/' );
+ *++dp = '/'; *++dp = 0;
+ if( strcmp(filebox->fs->get_current_dir(), dir_path) ) {
+ filebox->fs->change_dir(dir_path);
+ filebox->refresh(1);
+ }
+ update(dir_path);
return 1;
}
return 0;
-int BC_FileBox::refresh()
+int BC_FileBox::refresh(int zscroll)
{
create_tables();
listbox->set_master_column(column_of_type(FILEBOX_NAME), 0);
- listbox->update(list_column,
- column_titles,
- column_width,
- columns,
- listbox->get_xposition(),
- listbox->get_yposition(),
- -1,
- 1);
-
+ listbox->update(list_column, column_titles, column_width, columns,
+ !zscroll ? listbox->get_xposition() : 0,
+ !zscroll ? listbox->get_yposition() : 0,
+ -1, 1);
return 0;
}
// filename);
strcpy(submitted_path, current_path);
fs->change_dir(dir, 0);
- refresh();
+ refresh(1);
directory_title->update(fs->get_current_dir());
if(want_directory)
textbox->update(fs->get_current_dir());
if(fs->is_dir(path) && !use_this)
{
fs->change_dir(path, 0);
- refresh();
+ refresh(1);
directory_title->update(fs->get_current_dir());
strcpy(this->current_path, fs->get_current_dir());
strcpy(this->submitted_path, fs->get_current_dir());
void create_history();
void update_history();
- int refresh();
+ int refresh(int zscroll=0);
// The OK and Use This button submits a path.
// The cancel button has a current path highlighted but possibly different from the
+++ /dev/null
-
-/*
- * CINELERRA
- * Copyright (C) 2005 Pierre Dumuid
- *
- * 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
- *
- */
-
-#include "bcrelocatablewidget.h"
-
-BC_RelocatableWidget::BC_RelocatableWidget()
-{
-}
-
-
+++ /dev/null
-
-/*
- * CINELERRA
- * Copyright (C) 2005 Pierre Dumuid
- *
- * 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 BCRELOCATABLEWIDGET_H
-#define BCRELOCATABLEWIDGET_H
-
-class BC_RelocatableWidget
-{
-public:
- BC_RelocatableWidget();
- virtual int reposition_widget(int x, int y, int w = -1, int h = -1) { return -1; };
- virtual int get_w() {return -1; };
- virtual int get_h() {return -1; };
-};
-
-#endif
+++ /dev/null
-
-/*
- * CINELERRA
- * Copyright (C) 2005 Pierre Dumuid
- *
- * 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 BCRELOCATABLEWIDGET_INC
-#define BCRELOCATABLEWIDGET_INC
-
-class BC_RelocatableWidget;
-
-#endif
+++ /dev/null
-
-/*
- * CINELERRA
- * Copyright (C) 2005 Pierre Dumuid
- *
- * 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
- *
- */
-
-#include "clip.h"
-#include "bctitle.h"
-#include "bcpot.h"
-#include "bcslider.h"
-#include "bcwidgetgrid.h"
-
-
-BC_WidgetGrid::BC_WidgetGrid(int x1, int y1, int x2, int y2,int cgs,int rgs){
- x_l = x1; // x position
- y_t = y1; // y position
- x_r = x2; // right margin (used only in get_w_wm)
- y_b = y2; // left margin (used only in get_w_wm)
- rowgaps = rgs;
- colgaps = cgs;
-
- for (int r = 0; r < BC_WG_Rows; r++)
- minh[r] = 0;
-
- for (int c = 0; c < BC_WG_Cols; c++)
- minw[c] = 0;
-
- for (int r = 0; r < BC_WG_Rows; r++)
- for (int c = 0; c < BC_WG_Cols; c++) {
- widget_types[r][c] = BC_WT_NONE;
- widget_valign[r][c] = VALIGN_CENTER;
- widget_halign[r][c] = HALIGN_LEFT;
- widget_colspan[r][c] = 1;
- widget_rowspan[r][c] = 1;
- }
-}
-
-BC_RelocatableWidget * BC_WidgetGrid::add(BC_RelocatableWidget *h, int row, int column) {
- widget_types[row][column] = BC_WT_RelocatableWidget;
- widget_widgs[row][column] = h;
- return(h);
-}
-
-
-
-void BC_WidgetGrid::calculate_maxs(){
- int r,c;
- for (r = 0; r < BC_WG_Rows; r++) {
- maxh[r] = minh[r];
- for (c = 0; c < BC_WG_Cols; c++) {
- if ((widget_rowspan[r][c] == 1) && (getw_h(r,c) > maxh[r]))
- maxh[r] = getw_h(r,c);
- }
- }
-
- for (c = 0; c < BC_WG_Cols; c++) {
- maxw[c] = minw[c];
- for (r = 0; r < BC_WG_Rows; r++) {
- if ((widget_colspan[r][c] == 1) && (getw_w(r,c) > maxw[c]))
- maxw[c] = getw_w(r,c);
- }
- }
-
- // Fix up for row & colspans:
- for (c = 0; c < BC_WG_Cols; c++) {
- for (r = 0; r < BC_WG_Rows; r++) {
- int c_cs = MIN(BC_WG_Cols - c + 1, widget_colspan[r][c]);
- int c_rs = MIN(BC_WG_Rows - c + 1, widget_rowspan[r][c]);
-
- if ((widget_colspan[r][c] > 1)) {
- int csw = 0;
- int c2;
- for (c2 = c; c2 < c + c_cs; c2++) {
- csw += maxw[c2];
- }
- if (csw < getw_w(r,c)) {
- for (c2 = c; c2 < c + c_cs; c2++) {
- maxw[c2] += (csw - getw_w(r,c))/c_cs;
- }
- }
- }
-
- if ((widget_rowspan[r][c] > 1)) {
- int csh = 0;
- int r2;
- for (r2 = c; r2 < r + c_rs; r2++) {
- csh += maxh[r2];
- }
- if (csh < getw_h(r,c)) {
- for (r2 = c; r2 < r + c_rs; r2++) {
- maxh[r2] += (csh - getw_h(r,c))/c_rs;
- }
- }
- }
- }
- }
-}
-
-void BC_WidgetGrid::clear_widget(int row, int column){
- widget_types[row][column] = BC_WT_NONE;
-}
-
-int BC_WidgetGrid::get_h(){
- calculate_maxs();
- int y = 0;
- for (int i = 0; i < BC_WG_Rows; i++)
- if (maxh[i] > 0)
- y += maxh[i] + rowgaps;
- return (y);
-}
-
-int BC_WidgetGrid::get_h_wm(){
- return (y_t + get_h() + y_b);
-}
-
-int BC_WidgetGrid::get_w(){
- calculate_maxs();
- int x = 0;
- for (int i = 0; i < BC_WG_Cols; i++)
- if (maxw[i] > 0)
- x += maxw[i] + colgaps;
- return (x);
-}
-
-int BC_WidgetGrid::get_w_wm(){
- return (x_l + get_w() + x_r);
-}
-
-int BC_WidgetGrid::getw_h(int row, int column) {
- switch (widget_types[row][column]) {
- case BC_WT_RelocatableWidget:
- return(widget_widgs[row][column]->get_h());
- default: break;
- }
- return 0;
-}
-
-int BC_WidgetGrid::getw_w(int row, int column) {
- switch (widget_types[row][column]) {
- case BC_WT_RelocatableWidget:
- return(widget_widgs[row][column]->get_w());
- default: break;
- }
- return 0;
-}
-
-int BC_WidgetGrid::guess_x(int colno){
- calculate_maxs();
- int x = x_l;
- for (int i = 0; i < colno; i++)
- x += maxw[i] + colgaps;
- return (x);
-}
-
-int BC_WidgetGrid::guess_y(int colno){
- calculate_maxs();
- int y = y_t;
- for (int i = 0; i < colno; i++)
- y += maxh[i] + rowgaps;
- return (y);
-}
-
-void BC_WidgetGrid::move_widgets(){
- calculate_maxs();
- int r,c,x,y;
- int xn,yn;
- y = y_t;
- for (r = 0; r < BC_WG_Rows; r++) {
- x = x_l;
- for (c = 0; c < BC_WG_Cols; c++) {
- switch (widget_valign[r][c]){
- default:
- case VALIGN_TOP:
- yn = y;
- break;
- case VALIGN_CENTER:
- yn = y + (maxh[r] - getw_h(r,c))/2;
- break;
- case VALIGN_BOTTOM:
- yn = y + (maxh[r] - getw_h(r,c));
- break;
- }
-
- switch (widget_halign[r][c]){
- default:
- case HALIGN_LEFT:
- xn = x;
- break;
- case HALIGN_CENTER:
- xn = x + (maxw[c] - getw_w(r,c))/2;
- break;
- case HALIGN_RIGHT:
- xn = x + (maxw[c] - getw_w(r,c));
- break;
- }
- setw_position(r,c,xn,yn); // + (maxh[r] - getw_h(r,c))/2);
- x += colgaps + maxw[c];
- }
- y += rowgaps + maxh[r];
- }
-}
-
-void BC_WidgetGrid::print(){
- printf("\nWidget Grid: Widths: x_l=%d y_t=%d x_r=%d y_b=%d\n",x_l,y_t,x_r,y_b);
- calculate_maxs();
- for (int r = 0; r < BC_WG_Rows; r++) {
- for (int c = 0; c < BC_WG_Cols; c++) {
- printf("%d,%d\t",getw_w(r,c),getw_h(r,c));
- }
- printf("MAX: %d\n",maxh[r]);
- }
- printf("---------------------------------------------\n");
- for (int c = 0; c < BC_WG_Cols; c++)
- printf("%d\t",maxw[c]);
- printf("\n\n");
-
-}
-
-int BC_WidgetGrid::reposition_widget(int x, int y, int w1, int h){
- x_l = x;
- y_t = y;
- move_widgets();
- return(0);
-}
-
-void BC_WidgetGrid::set_align(int r,int c,int va, int ha){
- widget_valign[r][c] = va;
- widget_halign[r][c] = ha;
-}
-
-void BC_WidgetGrid::set_crspan(int r,int c,int cs, int rs){
- widget_colspan[r][c] = cs;
- widget_rowspan[r][c] = rs;
-}
-
-void BC_WidgetGrid::set_minw(int c,int w){
- minw[c] = w;
-}
-
-void BC_WidgetGrid::set_minh(int c,int h){
- minh[c] = h;
-}
-
-void BC_WidgetGrid::setw_position(int row,int column,int x, int y) {
- switch (widget_types[row][column]) {
- case BC_WT_NONE:
- break;
- case BC_WT_RelocatableWidget:
- widget_widgs[row][column]->reposition_widget(x,y);
- break;
- }
-}
-
-
-BC_WidgetGridList::BC_WidgetGridList()
- : ArrayList<BC_WidgetGrid*>()
-{
-}
-
-BC_WidgetGridList::~BC_WidgetGridList()
-{
-}
-
+++ /dev/null
-
-/*
- * CINELERRA
- * Copyright (C) 2005 Pierre Dumuid
- *
- * 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 BCWIDGETGRID_H
-#define BCWIDGETGRID_H
-
-#include "arraylist.h"
-#include "bcrelocatablewidget.h"
-#include "bctoggle.h"
-#include "bctextbox.h"
-#include "bcsubwindow.h"
-
-#define BC_WG_Rows 25
-#define BC_WG_Cols 10
-
-
-
-
-class BC_WidgetGrid : public BC_RelocatableWidget {
-public:
- BC_WidgetGrid(int x, int y, int x_r, int y_b, int colgaps, int rowgaps);
- virtual ~BC_WidgetGrid() {}
-
- BC_RelocatableWidget * add(BC_RelocatableWidget *h, int row, int column);
- void calculate_maxs();
- void clear_widget(int row, int column);
-
- int get_h();
- int get_h_wm();
- int get_w();
- int get_w_wm();
-
- int getw_w(int row, int column);
- int getw_h(int row, int column);
-
- int guess_x(int col);
- int guess_y(int row);
-
- void move_widgets();
- void print();
- int reposition_widget(int x, int y, int w = -1, int h = -1);
-
- void set_align(int r,int c,int va, int ha);
- void set_crspan(int r,int c,int cs, int rs);
- void set_minh(int c, int h);
- void set_minw(int c, int w);
- void setw_position(int row,int column,int x, int y);
-
- enum {
- VALIGN_TOP,
- VALIGN_CENTER,
- VALIGN_BOTTOM
- };
-
- enum {
- HALIGN_LEFT,
- HALIGN_CENTER,
- HALIGN_RIGHT
- };
-
- enum {
- BC_WT_NONE,
- BC_WT_RelocatableWidget
- };
-
-private:
- int widget_types[BC_WG_Rows][BC_WG_Cols];
- int widget_valign[BC_WG_Rows][BC_WG_Cols];
- int widget_halign[BC_WG_Rows][BC_WG_Cols];
- int widget_colspan[BC_WG_Rows][BC_WG_Cols];
- int widget_rowspan[BC_WG_Rows][BC_WG_Cols];
-
- // array of pointers:
- BC_RelocatableWidget *widget_widgs[BC_WG_Rows][BC_WG_Cols];
-
- int rowgaps;
- int colgaps;
-
- int maxw[BC_WG_Cols];
- int maxh[BC_WG_Rows];
-
- int minw[BC_WG_Cols];
- int minh[BC_WG_Rows];
-
- int x_l,x_r,y_t,y_b; // left, right, top,bottom margins.
-};
-
-
-class BC_WidgetGridList : public ArrayList<BC_WidgetGrid*>
-{
-public:
- BC_WidgetGridList();
- ~BC_WidgetGridList();
-
-
-private:
-
-};
-
-#endif
+++ /dev/null
-
-/*
- * CINELERRA
- * Copyright (C) 2005 Pierre Dumuid
- *
- * 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 BCWIDGETGRID_INC
-#define BCWIDGETGRID_INC
-
-
-class BC_WidgetGrid;
-class BC_WidgetGridList;
-
-#endif
#include "bcsubwindow.h"
#include "bcsynchronous.h"
#include "bctimer.h"
-#include "bcwidgetgrid.h"
#include "bcwindowbase.h"
#include "bcwindowevents.h"
#include "bccmodels.h"
delete subwindows;
}
- if(widgetgrids) {
- while (widgetgrids->total) {
- delete widgetgrids->last();
- widgetgrids->remove();
- }
- delete widgetgrids;
- }
-
-
delete pixmap;
#ifdef HAVE_GL
top_level = 0;
parent_window = 0;
subwindows = 0;
- widgetgrids = 0;
xinerama_info = 0;
xinerama_screens = 0;
xvideo_port_id = -1;
if(bg_pixmap) shared_bg_pixmap = 1;
subwindows = new BC_SubWindowList;
- widgetgrids = new BC_WidgetGridList;
if(window_type == MAIN_WINDOW)
{
return add_subwindow(subwindow);
}
-BC_WidgetGrid* BC_WindowBase::add_widgetgrid(BC_WidgetGrid *widgetgrid)
-{
- widgetgrids->append(widgetgrid);
- return widgetgrid;
-}
-
-
int BC_WindowBase::flash(int x, int y, int w, int h, int flush)
{
//printf("BC_WindowBase::flash %d %d %d %d %d\n", __LINE__, w, h, this->w, this->h);
return 0;
}
-int BC_WindowBase::reposition_widget(int x, int y, int w, int h)
-{
- return reposition_window(x, y, w, h);
-}
-
int BC_WindowBase::reposition_window(int x, int y)
{
reposition_window(x, y, -1, -1);
#include "bcpopupmenu.inc"
#include "bcpot.inc"
#include "bcprogress.inc"
-#include "bcrelocatablewidget.h"
#include "bcrepeater.inc"
#include "bcresources.inc"
#include "bcscrollbar.inc"
#include "bctitle.inc"
#include "bctoggle.inc"
#include "bctumble.inc"
-#include "bcwidgetgrid.inc"
#include "bcwindow.inc"
#include "bcwindowbase.inc"
#include "bcwindowevents.inc"
// Windows, subwindows, popupwindows inherit from this
-class BC_WindowBase : public BC_RelocatableWidget
+class BC_WindowBase
{
public:
BC_WindowBase(int opts=0);
BC_MenuBar* add_menubar(BC_MenuBar *menu_bar);
BC_WindowBase* add_subwindow(BC_WindowBase *subwindow);
BC_WindowBase* add_tool(BC_WindowBase *subwindow);
- BC_WidgetGrid* add_widgetgrid(BC_WidgetGrid *widgetgrid);
// Use this to get events for the popup window.
// Events are not propagated to the popup window.
int reposition_window(int x, int y, int w, int h);
int reposition_window_relative(int dx, int dy);
int reposition_window_relative(int dx, int dy, int w, int h);
- int reposition_widget(int x, int y, int w, int h);
// Cause a repeat event to be dispatched every duration.
// duration is milliseconds
int set_repeat(int64_t duration);
// list of window bases in this window
BC_SubWindowList* subwindows;
// list of window bases in this window
- BC_WidgetGridList* widgetgrids;
ArrayList<BC_WindowBase*> popups;
// Position of window
int x, y, w, h;
+enabled libx265 && { use_pkg_config x265 "stdint.h x265.h" x265_encoder_encode ||
+ { require libx265 x265.h x265_encoder_encode -lx265 -lstdc++ &&
+ warn "using libx265 without pkg-config"; } } &&
- { check_cpp_condition x265.h "X265_BUILD >= 17" ||
- die "ERROR: libx265 version must be >= 17."; }
+ { check_cpp_condition x265.h "X265_BUILD >= 57" ||
+ die "ERROR: libx265 version must be >= 57."; }
enabled libxavs && require libxavs xavs.h xavs_encoder_encode -lxavs