MFC and libvlc,rtsp

This forum is about all development around libVLC.
passionggg
Blank Cone
Blank Cone
Posts: 18
Joined: 06 May 2010 07:27

MFC and libvlc,rtsp

Postby passionggg » 08 May 2010 08:34

hi,every body
now i has set up a MFC project in VS2008 to use libvlc.lib, libvlccore.lib and the plugins. it used to read rtsp data in real time and display it in my window. the main code is as follows:
char path[100];
this->GetDlgItemText(IDC_EDIT1, path, 100); //path is "rtsp://192.168.1.1:6002/h264"
libvlc_exception_t ex;
libvlc_exception_init(&ex);
int vlc_argc = 0;
char *vlc_argv[100];
vlc_argv[vlc_argc++] = "--ignore-config";
libvlc_instance_t *p_instance = libvlc_new(
vlc_argc, vlc_argv, &ex);
libvlc_media_t *p_media = libvlc_media_new(
p_instance, path, &ex);
libvlc_media_player_t *p_media_player
= libvlc_media_player_new_from_media(
p_media, &ex);
libvlc_drawable_t hwnd =
(libvlc_drawable_t) this->GetDlgItem(IDC_DISPLAY)->GetSafeHwnd();
libvlc_media_player_set_drawable(p_media_player, hwnd, &ex);
libvlc_media_player_play(p_media_player, &ex);
and display the video indeed.
But the question is: i want to do some process about the raw video data before display it. i can not find the function about register or callback to get the raw data from rtsp. what can i do?
anyone who knows please give me some messages. Thanks.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: MFC and libvlc,rtsp

Postby Jean-Baptiste Kempf » 08 May 2010 19:32

You want to play the data with VLC and then modify the data and then display it as you want?
Please use vmem module.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

passionggg
Blank Cone
Blank Cone
Posts: 18
Joined: 06 May 2010 07:27

Re: MFC and libvlc,rtsp

Postby passionggg » 10 May 2010 04:47

i want to get the raw data through rtsp and libvlc and the plugins. is it using the function libvlc_event_attach or others to give a callback function?
i found the decoded raw data in the pointer p_pic of the function DecodeVideo in /module/codec/avcodec/video.c.
i want to do some changes of the raw data in the MFC of using libvlc and the plugins. does anyone have an example? Thanks

passionggg
Blank Cone
Blank Cone
Posts: 18
Joined: 06 May 2010 07:27

Re: MFC and libvlc,rtsp

Postby passionggg » 20 May 2010 08:12

Thanks j-b.
Now i have succeeded to do this work according your advice that is to use vmem module. and see some example in the forum about the Qt codes, that is to invoke the lock and unlock callback function.
Thank to all every one's help!

hussam_2000
Blank Cone
Blank Cone
Posts: 65
Joined: 03 Aug 2010 21:03

Re: MFC and libvlc,rtsp

Postby hussam_2000 » 24 Sep 2010 17:17

PASSIONGGG !!!! how did you setup your MFC project to work ???!?!? What do i need to do with plugins and libraries !! i cannot get my 2008 MFC project to do anyting !! im trying to do extactly what you are doing . im experienced in WinForm but i was pushed back to MFC :( where do i need to put dlls and libraries !!please help!!!


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 3 guests