Problem getting from changing version 0.10 to 1.2

Weavel weavel37 at yahoo.fr
Fri Oct 11 06:38:20 PDT 2013


Hi Sebastian, thanks for the reply.
I did get gst-rtsp-server from GIT. I also apply the changes that I could
read through various documentations but a problem still persists. Maybe i'm
wrong and i just miss something ? It's certainly a problem of libraries but
i checked and saw nothing strange.
It works fine on 0.10, but not on 1.2. I'll give my steps in this approach.  

*Errors during compilation (sh make.sh):*

/tmp/cclTeKeN.o: In function `main':
main-previ_1_2.c:(.text+0x84): undefined reference to
`gst_rtsp_server_get_mount_points'
main-previ_1_2.c:(.text+0x12a): undefined reference to
`gst_rtsp_media_mount_add_factory'
collect2: ld returned 1 exit status

*Bash file execution (make.sh):*

#For version 1.2 :
gcc main-previ_1_2.c -o daemon `pkg-config --cflags --libs gstreamer-1.0
gst-rtsp-server-0.10`

#For version 0.10 :
#gcc main-previ_1_2.c -o daemon `pkg-config --cflags --libs gstreamer-0.10
gst-rtsp-server-0.10`

*Code (main-previ_1_2.c)*

#include <gst/gst.h>
#include <gst/rtsp-server/rtsp-server.h>

#undef WITH_AUTH

gchar *stri;

static gboolean
timeout (GstRTSPServer * server, gboolean ignored) {

	GstRTSPSessionPool *pool;
	pool = gst_rtsp_server_get_session_pool (server);
	gst_rtsp_session_pool_cleanup (pool);
	g_object_unref (pool);
	return TRUE;
	}
int
main (int argc, char *argv[])
{
GMainLoop *loop;
GstRTSPServer *server;

/* Version 1.2 */
GstRTSPMountPoints *mount;

/* Version 0.10 */
//GstRTSPMediaMapping *mapping;

GstRTSPMediaFactory *factory;
#ifdef WITH_AUTH
GstRTSPAuth *auth;
gchar *basic;
#endif

gst_init (&argc, &argv);
loop = g_main_loop_new (NULL, FALSE);

server = gst_rtsp_server_new ();

/* Version 1.2 */
mount = gst_rtsp_server_get_mount_points (server);

/* Version 0.10 */
//mapping = gst_rtsp_server_get_media_mapping (server);

gst_rtsp_server_set_service(server, "3000");
#ifdef WITH_AUTH
auth = gst_rtsp_auth_new ();
basic = gst_rtsp_auth_make_basic ("user", "admin");
gst_rtsp_auth_set_basic (auth, basic);
g_free (basic);
gst_rtsp_server_set_auth (server, auth);
#endif
GstElement *pipeline;
factory = gst_rtsp_media_factory_new ();

/* Version 1.2 */
stri = g_strdup_printf("decklinksrc mode=2 connection=0 name=decklinksrc0 !
queue ! videoconvert ! deinterlace !  videorate ! x264enc speed-preset=6 
byte-stream=true tune=zerolatency bitrate=4100 ! rtph264pay name=pay0 pt=96
decklinksrc0.audiosrc !  queue ! audioconvert ! audiorate ! audioresample !
faac bitrate=192000 ! rtpmp4apay name=pay1 pt=97");

/* Version 0.10 */
//stri = g_strdup_printf("decklinksrc mode=2 connection=0 name=decklinksrc0
! queue ! ffmpegcolorspace ! deinterlace !  videorate ! x264enc
speed-preset=6  byte-stream=true tune=zerolatency bitrate=4100 ! rtph264pay
name=pay0 pt=96 decklinksrc0.audiosrc !  queue ! audioconvert ! audiorate !
audioresample ! faac bitrate=192000 ! rtpmp4apay name=pay1 pt=97");

pipeline=gst_parse_launch(stri, NULL);
gst_rtsp_media_factory_set_launch (factory, stri);
gst_rtsp_media_factory_set_shared (factory, TRUE);

/* Version 1.2 */
gst_rtsp_media_mount_add_factory (mount, "/stream", factory);
g_object_unref (mount);

/* Version 0.10 */
//gst_rtsp_media_mapping_add_factory (mapping, "/stream", factory);
//g_object_unref (mapping);

if (gst_rtsp_server_attach (server, NULL) == 0)
goto failed;
g_timeout_add_seconds (2, (GSourceFunc) timeout, server);
g_main_loop_run (loop);
return 0;
failed:
{
g_print ("failed to attach the server\n");
return -1;
}
}

Can someone help me to find it out ?

Thanks & Regards,
*Weavel*



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Getting-problems-to-change-Gstreamer-version-0-10-into-1-2-tp4662452p4662541.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list