Skip to content

Commit

Permalink
[tinyPy] Add methods to seek to time and to query current picture fla…
Browse files Browse the repository at this point in the history
…gs to the Python interface

setCurrentPts(double) in pyAdm expects exact time as argument, seeks to the
last keyframe before the given time otherwise.

Flags returned by getCurrentFlags() in pyEditor are a bitwise OR of values
defined in avidemux_core/ADM_coreImage/include/ADM_imageFlags.h.
  • Loading branch information
eumagga0x2a committed Jan 26, 2021
1 parent 721f452 commit f2c854a
Show file tree
Hide file tree
Showing 6 changed files with 549 additions and 498 deletions.
10 changes: 10 additions & 0 deletions avidemux_plugins/ADM_scriptEngines/tinyPy/src/ADM_pyAvidemux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,16 @@ double pyGetDts(IEditor *editor, int frameNum)

return (double)dts;
}
/**
\fn pyGetCurrentFrameFlags
*/
int pyGetCurrentFrameFlags(IEditor *editor)
{
uint32_t flags,qz;
if(false == editor->getCurrentFrameFlags(&flags,&qz))
return -1;
return flags;
}

/**
\fn pyGetPrevKFramePts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,16 @@ int pyGetFps1000(IEditor *editor);
int pyGetWidth(IEditor *editor);
int pyGetHeight(IEditor *editor);

/* Editing-related info */
int pyGetCurrentFrameFlags(IEditor *editor);
double pyGetPrevKFramePts(IEditor *editor, double time);
double pyGetNextKFramePts(IEditor *editor, double time);

/* Detail info (debug) */
int pyHexDumpFrame(IEditor *editor, int framenumber);
int pyPrintTiming(IEditor *editor, int framenumber);
double pyGetPts(IEditor *editor, int frameNum);
double pyGetDts(IEditor *editor, int frameNum);
double pyGetPrevKFramePts(IEditor *editor, double time);
double pyGetNextKFramePts(IEditor *editor , double time);

/* File operation */
char *pyFileSelWrite(IEditor *editor, const char *title);
Expand Down
Loading

0 comments on commit f2c854a

Please sign in to comment.