mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
info: enable discovered
Add comment telling how to regenerate the vapi files.
This commit is contained in:
parent
0fdfd4d0af
commit
2448bf8b80
1 changed files with 22 additions and 3 deletions
|
@ -20,10 +20,19 @@
|
||||||
using Gtk;
|
using Gtk;
|
||||||
using Gst;
|
using Gst;
|
||||||
|
|
||||||
|
/*
|
||||||
|
we need to update the vapi for yet unreleased gstreamer api:
|
||||||
|
|
||||||
|
cd vala/mediainfo/vapi
|
||||||
|
vala-gen-introspect gstreamer-pbutils-0.10 packages/gstreamer-pbutils-0.10 && ../vapigen/vapigen --vapidir . --library \
|
||||||
|
gstreamer-pbutils-0.10 packages/gstreamer-pbutils-0.10/gstreamer-pbutils-0.10.gi
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
public class MediaInfo.Info : VBox
|
public class MediaInfo.Info : VBox
|
||||||
{
|
{
|
||||||
private Label uri;
|
private Label uri;
|
||||||
//private Discoverer dc;
|
private Discoverer dc;
|
||||||
private DrawingArea drawing_area;
|
private DrawingArea drawing_area;
|
||||||
private Pipeline pb;
|
private Pipeline pb;
|
||||||
|
|
||||||
|
@ -43,7 +52,11 @@ public class MediaInfo.Info : VBox
|
||||||
show_all ();
|
show_all ();
|
||||||
|
|
||||||
// set up the gstreamer components
|
// set up the gstreamer components
|
||||||
//dc = new Discoverer (Gst.SECONDS * 10, null);
|
try {
|
||||||
|
dc = new Discoverer ((ClockTime)(Gst.SECOND * 10));
|
||||||
|
} catch (Error e) {
|
||||||
|
debug ("Failed to create the discoverer: %s", e.message);
|
||||||
|
}
|
||||||
|
|
||||||
pb = ElementFactory.make ("playbin2", "player") as Pipeline;
|
pb = ElementFactory.make ("playbin2", "player") as Pipeline;
|
||||||
Gst.Bus bus = pb.get_bus ();
|
Gst.Bus bus = pb.get_bus ();
|
||||||
|
@ -69,7 +82,13 @@ public class MediaInfo.Info : VBox
|
||||||
|
|
||||||
this.uri.set_text (uri);
|
this.uri.set_text (uri);
|
||||||
if (uri != null) {
|
if (uri != null) {
|
||||||
//DiscovererInfo info = dc.discover_uri (uri, null);
|
DiscovererInfo info;
|
||||||
|
|
||||||
|
try {
|
||||||
|
info = dc.discover_uri (uri);
|
||||||
|
} catch (Error e) {
|
||||||
|
debug ("Failed to extract metadata from %s: %s", uri, e.message);
|
||||||
|
}
|
||||||
|
|
||||||
// play file
|
// play file
|
||||||
((GLib.Object)pb).set_property ("uri", uri);
|
((GLib.Object)pb).set_property ("uri", uri);
|
||||||
|
|
Loading…
Reference in a new issue