Сейчас я работаю с Gstreamer на Windows 7 (x86_64) в виртуальной машине (VirtualBox), и я хотел, чтобы запустить основной трубопровод:Gstreamer основной трубопровод работает, но не отображаются на окнах 7 VirtualBox
gst-launch-1.0 -v videotestsrc pattern=snow ! autovideosync
Когда я запустить этот трубопровод, я получаю:
Setting pipeline to PAUSED...
Pipeline is PREROLLING
И тогда возникает ошибка:
Pipeline doesn't want to preroll
Я решил эту проблему ошибка, добавив async-handling = true в конце конвейера, но ничего не отображается ...
Я попытался запустить тот же конвейер, написанный на C++-коде. Вот простой способ запускать. Когда я запускаю этот код, я не получаю ошибки, но ничего не отображается.
#include <gst/gst.h>
#include <glib.h>
#include <stdio.h>
int main(int argc, char* argv[]) {
GMainLoop *loop;
GstElement *pipeline, *source, *sink;
g_print("Starting...");
/* Initialisation */
gst_init(&argc, &argv);
g_print("Loop is created...");
loop = g_main_loop_new(NULL, FALSE);
/* Create gstreamer elements */
pipeline = gst_pipeline_new("gst-app-sink");
source = gst_element_factory_make("videotestsrc", "src");
sink = gst_element_factory_make("autovideosink", "sink");
if (!pipeline || !source || !sink) {
g_printerr("One element could not be created. Exiting.\n");
return -1;
}
/* Set up the pipeline */
/* we add all elements into the pipeline */
/* source | sink */
gst_bin_add_many(GST_BIN(pipeline), source, sink, NULL);
/* we link the elements together */
/* src -> sink */
gst_element_link(source, sink);
/* Set the pipeline to "playing" state*/
gst_element_set_state(pipeline, GST_STATE_PLAYING);
/* Iterate */
g_print("Running...\n");
g_main_loop_run(loop);
/* Out of the main loop, clean up nicely */
g_print("Returned, stopping playback\n");
gst_element_set_state(pipeline, GST_STATE_NULL);
g_print("Deleting pipeline\n");
gst_object_unref(GST_OBJECT(pipeline));
g_main_loop_unref(loop);
return 0;
}
Я действительно не знаю, где он может исходить от. Есть идеи?