Jean-Yves Didier

creation d'un systeme modulaire de compilation des bibliothèques de composants

1 <application mode="gui"> 1 <application mode="gui">
2 <context> 2 <context>
3 <libraries> 3 <libraries>
4 - <library path="../../../libs/osg"/> 4 + <library path="../../libs/osg"/>
5 </libraries> 5 </libraries>
6 <components> 6 <components>
7 <component id="sm" type="StateMachine"> 7 <component id="sm" type="StateMachine">
......
1 TEMPLATE=subdirs 1 TEMPLATE=subdirs
2 2
3 -system(pkg-config --exists Coin):HAS_COIN=TRUE
4 -system(pkg-config --exists opencv):HAS_OPENCV=TRUE
5 -system(pkg-config --exists Kenny):HAS_KENNY=TRUE
6 -
7 -system(pkg-config --exists libavformat && pkg-config --exists libavcodec && pkg-config --exists libavutil &&pkg-config --exists libswscale ):HAS_FFMPEG=TRUE
8 -
9 HAS_ARCS=$$(ARCSDIR) 3 HAS_ARCS=$$(ARCSDIR)
10 -
11 -
12 !isEmpty(HAS_ARCS) { 4 !isEmpty(HAS_ARCS) {
13 message(ARCS Directory found) 5 message(ARCS Directory found)
14 - unix:system(cd libs;populate.sh) 6 + # unix:system(cd libs;populate.sh)
15 - 7 + SUBDIRS+= utils network gui
16 - SUBDIRS+= utils
17 -}
18 -
19 -!isEmpty(HAS_COIN) {
20 - message (Coin was found)
21 - SUBDIRS+= scene/coin
22 - SUBDIRS+= scene/coinutils
23 - SUBDIRS+= scene/obj2so
24 -
25 - !isEmpty(HAS_OPENCV) {
26 - SUBDIRS+= scene/cv2so
27 - }
28 -}
29 -
30 -
31 -!isEmpty(HAS_OPENCV) {
32 - message (OpenCV was found)
33 -
34 isEmpty(NO_LEGACY) { 8 isEmpty(NO_LEGACY) {
35 - SUBDIRS+= legacy/input/framegrabber/opencv legacy/opencv legacy/pattern legacy/poseestimators 9 + SUBDIRS+= legacy/common legacy/hmi legacy/scene/3Dloaders
36 } 10 }
11 +} else {
12 + error(ARCS not found)
37 } 13 }
38 14
39 -!isEmpty(HAS_FFMPEG) {
40 - message (ffmpeg was found)
41 - system(pkg-config --atleast-version=52.25 libavcodec):OK_FFMPEG+=avcodec
42 - system(pkg-config --atleast-version=52.102 libavformat):OK_FFMPEG+=avformat
43 - system(pkg-config --atleast-version=0.12 libswscale):OK_FFMPEG+=swscale
44 -
45 - !isEmpty(OK_FFMPEG) {
46 - message(Good versions of libraries: $$OK_FFMPEG)
47 - }
48 -
49 - count(OK_FFMPEG,3) {
50 - message (ffmpeg components are included)
51 - SUBDIRS+=imageprocessing/ffmpeg
52 - }
53 -}
54 15
16 +FILES=$$files(pri/has*.pri)
17 +for(f, FILES):include($${f})
55 18
19 +FILES=$$files(pri/lib*.pri)
20 +for(f, FILES):include($${f})
56 21
57 22
58 -isEmpty(HAS_KENNY) {
59 - message (Oh my God they killed Kenny!)
60 -}
61 -
62 -isEmpty(NO_LEGACY) {
63 - SUBDIRS+= legacy/common legacy/hmi legacy/scene/3Dloaders
64 -}
65 -
......
...@@ -64,7 +64,7 @@ void VideoDecoder::initDecoder() ...@@ -64,7 +64,7 @@ void VideoDecoder::initDecoder()
64 videoStream=-1; 64 videoStream=-1;
65 for(int i=0; i<pFormatCtx->nb_streams; i++) 65 for(int i=0; i<pFormatCtx->nb_streams; i++)
66 { 66 {
67 - if(pFormatCtx->streams[i]->codec->codec_type==CODEC_TYPE_VIDEO) 67 + if(pFormatCtx->streams[i]->codec->codec_type==AVMEDIA_TYPE_VIDEO)//CODEC_TYPE_VIDEO)
68 { 68 {
69 videoStream=i; 69 videoStream=i;
70 break; 70 break;
......
...@@ -40,7 +40,7 @@ AVStream* VideoEncoder::addVideoStream(AVFormatContext *oc, CodecID codec_id) ...@@ -40,7 +40,7 @@ AVStream* VideoEncoder::addVideoStream(AVFormatContext *oc, CodecID codec_id)
40 return st; 40 return st;
41 c = st->codec; 41 c = st->codec;
42 c->codec_id = codec_id; 42 c->codec_id = codec_id;
43 - c->codec_type = CODEC_TYPE_VIDEO; 43 + c->codec_type = AVMEDIA_TYPE_VIDEO; //CODEC_TYPE_VIDEO;
44 44
45 /* put sample parameters */ 45 /* put sample parameters */
46 c->bit_rate = bitrate; 46 c->bit_rate = bitrate;
...@@ -291,7 +291,7 @@ void VideoEncoder::setImage(int w, int h, char* buffer) ...@@ -291,7 +291,7 @@ void VideoEncoder::setImage(int w, int h, char* buffer)
291 AVPacket pkt; 291 AVPacket pkt;
292 av_init_packet(&pkt); 292 av_init_packet(&pkt);
293 293
294 - pkt.flags |= PKT_FLAG_KEY; 294 + pkt.flags |= AV_PKT_FLAG_KEY; //PKT_FLAG_KEY;
295 pkt.stream_index= video_st->index; 295 pkt.stream_index= video_st->index;
296 pkt.data= (uint8_t *)picture; 296 pkt.data= (uint8_t *)picture;
297 pkt.size= sizeof(AVPicture); 297 pkt.size= sizeof(AVPicture);
...@@ -310,7 +310,7 @@ void VideoEncoder::setImage(int w, int h, char* buffer) ...@@ -310,7 +310,7 @@ void VideoEncoder::setImage(int w, int h, char* buffer)
310 310
311 pkt.pts= c->coded_frame->pts;//av_rescale_q(c->coded_frame->pts, c->frame_rate_base, video_st->frame_rate_base); 311 pkt.pts= c->coded_frame->pts;//av_rescale_q(c->coded_frame->pts, c->frame_rate_base, video_st->frame_rate_base);
312 if(c->coded_frame->key_frame) 312 if(c->coded_frame->key_frame)
313 - pkt.flags |= PKT_FLAG_KEY; 313 + pkt.flags |= AV_PKT_FLAG_KEY; //PKT_FLAG_KEY;
314 pkt.stream_index= video_st->index; 314 pkt.stream_index= video_st->index;
315 pkt.data= video_outbuf; 315 pkt.data= video_outbuf;
316 pkt.size= out_size; 316 pkt.size= out_size;
......