Gstreamer Application

Giritharan girisugu2 at gmail.com
Sat May 16 04:58:32 PDT 2015


Thanks for your reply.
Now i compile the following program.i just include my main alone.while i am
compiling i got the errors like
.plese help me to fix this
/vpuenc versions :)
   device name is Mxc Camera
        plugin: 3.0.7
        wrapper: 1.0.35(VPUWRAPPER_ARM_LINUX Build on Nov  6 2014 19:27:35)
        vpulib: 5.4.16
        firmware: 2.3.10.40778
Running...

(gstreamer_for_av:2457): GStreamer-CRITICAL **: gst_mini_object_unref:
assertion 'GST_IS_MINI_OBJECT (mini_object)' failed

(gstreamer_for_av:2457): GStreamer-CRITICAL **: gst_mini_object_unref:
assertion 'GST_IS_MINI_OBJECT (mini_object)' failed
Error: Internal data flow error.

(gstreamer_for_av:2457): GStreamer-CRITICAL **: gst_mini_object_unref:
assertion 'GST_IS_MINI_OBJECT (mini_object)' failed
Returned, stopping playback

(gstreamer_for_av:2457): GStreamer-CRITICAL **: gst_mini_object_unref:
assertion 'GST_IS_MINI_OBJECT (mini_object)' failed/
*int

****program starts****
main (int   argc,
      char *argv[])
{
  GMainLoop *loop;

  GstElement *pipeline,*video_source, *video_encoder,
*video_queue,*audio_source,*audio_encoder,*audio_queue,*audio_muxer, *sink,
*filter;
  //GstElement *pipeline, *source, *encoder, *sink;
  GstBus *bus;
  guint bus_watch_id;
//GstCaps *caps = gst_caps_new_empty(); 
  gst_init (&argc, &argv);
GstCaps *audio_caps;

  loop = g_main_loop_new (NULL, FALSE);
if(argc !=1)
{
 g_printerr ("Usage: %s <Ogg/Vorbis filename>\n", argv[0]);
    return -1;
  }
pipeline  = gst_pipeline_new("pipeline");
/*video source */
video_source    = gst_element_factory_make("mfw_v4lsrc", "video_source");
g_object_set (G_OBJECT (video_source), "capture-mode", 1, NULL);
g_object_set (G_OBJECT (video_source), "fps-n", 30, NULL);
/*codec encoder */
video_encoder   = gst_element_factory_make("vpuenc", "video_encoder");
g_object_set (G_OBJECT (video_encoder),"codec", 0 , NULL);
/*queue for video */
video_queue     = gst_element_factory_make("queue", "video_queue");
/*audio source */
audio_source     = gst_element_factory_make("alsasrc","audio_source");
filter    = gst_element_factory_make("capsfilter", "filter");
audio_caps = gst_caps_new_simple("audio/x-raw-int",
                                         "rate", G_TYPE_INT,48000,
                                         "channels",G_TYPE_INT,1,
                                          NULL);


g_object_set (G_OBJECT (filter), "caps", audio_caps, NULL);
/*audio encoder */
audio_encoder   = gst_element_factory_make("mfw_mp3encoder",
"audio_encoder");
/*audio queue */
audio_queue     = gst_element_factory_make("queue", "audio_queue");
/*muxer*/
audio_muxer     = gst_element_factory_make("avimux","audio_muxer");

sink      = gst_element_factory_make("multifilesink", "sink");
g_object_set (G_OBJECT (sink),
"location","/home/audio_video/Audio_Video.avi", NULL);
if(!pipeline || !video_source || !video_encoder || !video_queue
    || !audio_source || !audio_encoder || !audio_muxer
    || !filter || !sink) {
    g_printerr ("One element could not be created. Exiting.\n");
    return -1;
  }
printf("Creating watcher bus ID
*************************************************************************************************************\n");
  bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
  bus_watch_id = gst_bus_add_watch (bus, bus_call, loop);
  gst_object_unref (bus);


 gst_bin_add_many(GST_BIN (pipeline), video_source, video_encoder,
video_queue,audio_source,audio_encoder,audio_queue,audio_muxer,sink,filter,
NULL);


        gst_element_link_many (video_source,video_encoder,video_queue,NULL);
       
gst_element_link_many(audio_source,filter,audio_encoder,audio_queue,NULL);
        gst_element_link(audio_muxer,sink);



/*  bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
  bus_watch_id = gst_bus_add_watch (bus, bus_call, loop);
  gst_object_unref (bus);*/
printf("Sending SIGNAL to audio_muxer*********\n");
 g_signal_connect (audio_muxer, "pad-added", G_CALLBACK
(on_pad_added),sink);g_print ("Now playing: %s\n", argv[1]);
  gst_element_set_state (pipeline, GST_STATE_PLAYING);


  g_print ("Running...\n");
  g_main_loop_run (loop);


  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_source_remove (bus_watch_id);
  g_main_loop_unref (loop);

  return 0;
}*



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Gstreamer-Application-tp4671886p4671888.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list