After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 729120 - Gstreamer Editing Services (GES)(1.2.1) samples Using Gstreamer 1.2.4.1 on windows
Gstreamer Editing Services (GES)(1.2.1) samples Using Gstreamer 1.2.4.1 on wi...
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gst-editing-services
1.2.4
Other Windows
: Normal major
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-04-28 15:35 UTC by Benas
Modified: 2014-05-08 16:10 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Benas 2014-04-28 15:35:57 UTC
Hi,
I dowloaded and installed both gstreamer normal and dev packages for x86 from http://gstreamer.freedesktop.org/data/pkg/windows/1.2.4.1/ with all available options , created Visual Studio 2010 C++ project, added source.c file, added x86.props, gstreamer-1.0.props, gst-editing-services-1.0.props property sheet files to the solution, set working dir to $(GSTREAMER_1_0_ROOT_X86)\bin .


downloaded gstreamer-editing-services-1.2.1.tar.xz from http://gstreamer.freedesktop.org/src/gst-editing-services/ , extracted gstreamer-editing-services-1.2.1.tar.xz file twice with 7zip, opened gstreamer-editing-services-1.2.1\tests\examples\ dir and copied code from "simple1.c" example file to my solution, successfully built example project, added program launch parameter  in Visual Studio 2010 like this "D:\video.mpg" and finally launched the compiled program. Console seemed to be working for a few seconds and then it printed "Press any key to continue..." - no error messages, no video or audio output. What is more the same thing happens with the remaining test1.c, test2.c, test3.c, test4.c test files. What do I do wrong? Maybe it is impossible to launch these GES examples on Windows at all? Or maybe these examples are just outdated?
Comment 1 Benas 2014-05-08 16:10:04 UTC
I edited "test1.c" example and now it works:

#include <ges/ges.h>

int main (int argc, gchar ** argv)
{
  GESAsset *src_asset;
  GESPipeline *pipeline;
  GESTimeline *timeline;
  GESClip *source;
  GESLayer *layer;
  GMainLoop *mainloop;
  GError **error;
  gchar *uri;
  GESUriClipAsset *asset;
  /* Initialize GStreamer (this will parse environment variables and commandline
   * arguments. */
  gst_init (&argc, &argv);

  /* Initialize the GStreamer Editing Services */
  ges_init ();

  /* Setup of a A/V timeline */

  /* This is our main GESTimeline */
  timeline = ges_timeline_new_audio_video ();

  /* We are only going to be doing one layer of clips */
  layer = ges_layer_new ();

  /* Add the tracks and the layer to the timeline */
  if (!ges_timeline_add_layer (timeline, layer))
    return -1;

  /* We create a simple asset able to extract GESTestClip */
  uri = gst_filename_to_uri (argv[1], NULL);
  asset = ges_uri_clip_asset_request_sync(uri,error);
  src_asset = GES_ASSET(asset);

  /* Add sources to our layer */
  ges_layer_add_asset (layer, src_asset, 0, 0, 4*GST_SECOND,
      GES_TRACK_TYPE_UNKNOWN);

  /* In order to view our timeline, let's grab a convenience pipeline to put
   * our timeline in. */
  pipeline = ges_pipeline_new ();

  /* Add the timeline to that pipeline */
  if (!ges_pipeline_set_timeline (pipeline, timeline))
    return -1;

  /* The following is standard usage of a GStreamer pipeline (note how you haven't
   * had to care about GStreamer so far ?).
   *
   * We set the pipeline to playing ... */
  gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PLAYING);

  /* .. and we start a GMainLoop. GES **REQUIRES** a GMainLoop to be running in
   * order to function properly ! */
  mainloop = g_main_loop_new (NULL, FALSE);

  /* Simple code to have the mainloop shutdown after 4s */
  g_timeout_add_seconds (4, (GSourceFunc) g_main_loop_quit, mainloop);
  g_main_loop_run (mainloop);

  return 0;
}