started work on a bunch of small features
This commit is contained in:
@@ -14,6 +14,10 @@
|
|||||||
#define MEDIA_TYPE_SOLID 3
|
#define MEDIA_TYPE_SOLID 3
|
||||||
#define MEDIA_TYPE_TONE 4
|
#define MEDIA_TYPE_TONE 4
|
||||||
|
|
||||||
|
#define VIDEO_PROGRESSIVE 0
|
||||||
|
#define VIDEO_TOP_FIELD_FIRST 1
|
||||||
|
#define VIDEO_BOTTOM_FIELD_FIRST 2
|
||||||
|
|
||||||
struct Sequence;
|
struct Sequence;
|
||||||
struct Clip;
|
struct Clip;
|
||||||
|
|
||||||
@@ -23,6 +27,7 @@ struct MediaStream {
|
|||||||
int video_height;
|
int video_height;
|
||||||
bool infinite_length;
|
bool infinite_length;
|
||||||
double video_frame_rate;
|
double video_frame_rate;
|
||||||
|
int video_interlacing;
|
||||||
int audio_channels;
|
int audio_channels;
|
||||||
int audio_layout;
|
int audio_layout;
|
||||||
int audio_frequency;
|
int audio_frequency;
|
||||||
|
|||||||
+17
-5
@@ -541,12 +541,24 @@ void open_clip_worker(Clip* clip) {
|
|||||||
avfilter_graph_create_filter(&clip->buffersrc_ctx, avfilter_get_by_name("buffer"), "in", filter_args, NULL, clip->filter_graph);
|
avfilter_graph_create_filter(&clip->buffersrc_ctx, avfilter_get_by_name("buffer"), "in", filter_args, NULL, clip->filter_graph);
|
||||||
avfilter_graph_create_filter(&clip->buffersink_ctx, avfilter_get_by_name("buffersink"), "out", NULL, NULL, clip->filter_graph);
|
avfilter_graph_create_filter(&clip->buffersink_ctx, avfilter_get_by_name("buffersink"), "out", NULL, NULL, clip->filter_graph);
|
||||||
|
|
||||||
enum AVPixelFormat pix_fmts[] = { static_cast<AVPixelFormat>(dest_format), AV_PIX_FMT_NONE };
|
enum AVPixelFormat pix_fmts[] = { static_cast<AVPixelFormat>(dest_format), AV_PIX_FMT_NONE };
|
||||||
if (av_opt_set_int_list(clip->buffersink_ctx, "pix_fmts", pix_fmts, AV_PIX_FMT_NONE, AV_OPT_SEARCH_CHILDREN) < 0) {
|
if (av_opt_set_int_list(clip->buffersink_ctx, "pix_fmts", pix_fmts, AV_PIX_FMT_NONE, AV_OPT_SEARCH_CHILDREN) < 0) {
|
||||||
qDebug() << "[ERROR] Could not set output pixel format";
|
qDebug() << "[ERROR] Could not set output pixel format";
|
||||||
}
|
}
|
||||||
|
|
||||||
avfilter_link(clip->buffersrc_ctx, 0, clip->buffersink_ctx, 0);
|
bool interlaced = false;
|
||||||
|
if (interlaced) {
|
||||||
|
// TODO make better
|
||||||
|
AVFilterContext* yadif_filter;
|
||||||
|
avfilter_graph_create_filter(&yadif_filter, avfilter_get_by_name("yadif"), "yadif", "mode=3", NULL, clip->filter_graph);
|
||||||
|
|
||||||
|
clip->speed *= 2;
|
||||||
|
|
||||||
|
avfilter_link(clip->buffersrc_ctx, 0, yadif_filter, 0);
|
||||||
|
avfilter_link(yadif_filter, 0, clip->buffersink_ctx, 0);
|
||||||
|
} else {
|
||||||
|
avfilter_link(clip->buffersrc_ctx, 0, clip->buffersink_ctx, 0);
|
||||||
|
}
|
||||||
|
|
||||||
avfilter_graph_config(clip->filter_graph, NULL);
|
avfilter_graph_config(clip->filter_graph, NULL);
|
||||||
} else if (clip->stream->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) {
|
} else if (clip->stream->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) {
|
||||||
|
|||||||
+11
-3
@@ -341,10 +341,18 @@ void TimelineWidget::dragEnterEvent(QDragEnterEvent *event) {
|
|||||||
g.old_track = g.track;
|
g.old_track = g.track;
|
||||||
}
|
}
|
||||||
panel_timeline->importing = true;
|
panel_timeline->importing = true;
|
||||||
}/* else if (config.enable_drag_files_to_timeline && event->mimeData()->hasUrls()) {
|
} else if (config.enable_drag_files_to_timeline && event->mimeData()->hasUrls()) {
|
||||||
event->accept();
|
// TODO for this to work, we need a way to abort PreviewGenerator
|
||||||
|
|
||||||
}*/
|
event->accept();
|
||||||
|
qDebug() << "TODO get data for:";
|
||||||
|
QList<QUrl> urls = event->mimeData()->urls();
|
||||||
|
if (!urls.isEmpty()) {
|
||||||
|
for (int i=0;i<urls.size();i++) {
|
||||||
|
qDebug() << (urls.at(i).toLocalFile());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TimelineWidget::dragMoveEvent(QDragMoveEvent *event) {
|
void TimelineWidget::dragMoveEvent(QDragMoveEvent *event) {
|
||||||
|
|||||||
Reference in New Issue
Block a user