Changeset 2080ee9782dad606de14687d58f7902e707ecb96 for oggzcap
- Timestamp:
- 11/06/09 14:33:37 (2 years ago)
- Parents:
- 6ad46b97c08fbff92c569737162513719a8cee8d
- Children:
- c921505c5ad730161fe4d8eb95950eb4a3f30173
- git-committer:
- rgareus <rgareus@CITU-Cuboute.local> / 2009-11-06T15:33:37Z+0100
- Location:
- oggzcap
- Files:
-
- 4 modified
-
English.lproj/MainMenu.nib/designable.nib (modified) (7 diffs)
-
English.lproj/MainMenu.nib/keyedobjects.nib (modified) (previous)
-
src/MyController.mm (modified) (5 diffs)
-
src/videoout/encoder_example.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
oggzcap/English.lproj/MainMenu.nib/designable.nib
r6ad46b9 r2080ee9 9 9 <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> 10 10 <bool key="EncodedWithXMLCoder">YES</bool> 11 <integer value=" 1675"/>11 <integer value="221"/> 12 12 </object> 13 13 <object class="NSArray" key="IBDocument.PluginDependencies"> … … 992 992 <int key="NSCellFlags">-1804468671</int> 993 993 <int key="NSCellFlags2">272761856</int> 994 <string key="NSContents"> nowhere</string>994 <string key="NSContents">ScreenCapture Live</string> 995 995 <reference key="NSSupport" ref="26"/> 996 996 <reference key="NSControlView" ref="167497940"/> … … 1009 1009 <int key="NSCellFlags">-1804468671</int> 1010 1010 <int key="NSCellFlags2">272761856</int> 1011 <string key="NSContents"> theDescription</string>1011 <string key="NSContents">-</string> 1012 1012 <reference key="NSSupport" ref="26"/> 1013 1013 <reference key="NSControlView" ref="109046052"/> … … 1020 1020 <reference key="NSNextResponder" ref="706389167"/> 1021 1021 <int key="NSvFlags">256</int> 1022 <string key="NSFrame">{{ 25, 38}, {54, 12}}</string>1022 <string key="NSFrame">{{44, 33}, {34, 17}}</string> 1023 1023 <reference key="NSSuperview" ref="706389167"/> 1024 1024 <bool key="NSEnabled">YES</bool> … … 1026 1026 <int key="NSCellFlags">67239424</int> 1027 1027 <int key="NSCellFlags2">272629760</int> 1028 <string key="NSContents"> Location</string>1028 <string key="NSContents">Tags</string> 1029 1029 <reference key="NSSupport" ref="26"/> 1030 1030 <reference key="NSControlView" ref="84010202"/> … … 2974 2974 <reference ref="167497940"/> 2975 2975 <reference ref="109046052"/> 2976 <reference ref="768839191"/> 2976 2977 <reference ref="84010202"/> 2977 <reference ref="768839191"/>2978 2978 </object> 2979 2979 <reference key="parent" ref="830123516"/> … … 3618 3618 <string>com.apple.InterfaceBuilder.CocoaPlugin</string> 3619 3619 <reference ref="9"/> 3620 <string>{{ 445, 114}, {439, 412}}</string>3621 <string>{{ 445, 114}, {439, 412}}</string>3620 <string>{{257, 229}, {439, 412}}</string> 3621 <string>{{257, 229}, {439, 412}}</string> 3622 3622 <reference ref="9"/> 3623 3623 <reference ref="9"/> -
oggzcap/src/MyController.mm
r0a70e0d r2080ee9 4 4 5 5 extern "C" { 6 int myOggfwd_init( char* outIceIp, int outIcePort, char* outIceMount ) ; 6 int myOggfwd_init( const char* outIceIp, int outIcePort, const char* outIceMount, 7 const char *description, const char *genre, const char *name, const char *url ); 7 8 void myOggfwd_close() ; 8 9 void encoder_example_init(int inW, int inH, int inFramerate, int in_video_r, int in_video_q) ; … … 261 262 } 262 263 263 -(void)stopIn264 {265 [self pLog:@"Stopping Video In...\n"] ;266 267 ////////////////// Temp exchange File Things268 inoutExchangeFile = fopen("/InOut/Config/InOutComponent/InOutComponentControl.txt", "wb") ;269 char wBuff[] = {'0','\n','\n','\n'} ;270 fwrite(wBuff,1,4,inoutExchangeFile) ;271 if(inoutExchangeFile) fclose(inoutExchangeFile) ;272 273 inListening = FALSE ;274 275 ////////////////// REMOVE VIEWER if toggle on276 if(showInPreview) [self closeInPreview] ;277 278 ////////////////// Clear Display279 [self clearInDisplay] ;280 281 [startInButton setEnabled:YES];282 [stopInButton setEnabled:NO];283 }284 285 - (void)openInPreview286 {287 printf("INOUT - Open InPreview Window\n") ;288 289 if (!videOpened) {290 vide = [[SGVideo alloc] initWithSeqGrab:mGrabber myView:inPreviewView];291 if(vide!=nil) {292 videOpened = TRUE ;293 [vide setUsage:seqGrabPreview + seqGrabRecord + seqGrabPlayDuringRecord];294 [mGrabber preview];295 }296 else {297 NSRunAlertPanel(@"Video Input Problem",298 @"Couldn't create a video channel. Check your video device connections and try again.",299 nil, nil, nil);300 }301 }302 else {303 [mGrabber preview];304 }305 //if(vide!=nil) [vide release]; // it was retained by its mGrabber306 }307 - (void)closeInPreview308 {309 printf("INOUT - Close InPreview Window\n") ;310 311 [mGrabber stop];312 313 //SGChan* doomedChan = [[mGrabber channels] objectAtIndex:myIndex];314 //[mGrabber removeChannel:doomedChan];315 }316 317 264 -(void)startOut 318 265 { … … 322 269 int tmpIcecastPort = [outIcecastPortTF intValue] ; 323 270 NSString *tmpIcecastMount = [outIcecastMountTF stringValue] ; 271 272 NSString *tmpStrName = [projectName stringValue] ; 273 NSString *tmpStrAuthor = [projectAuthor stringValue] ; 274 NSString *tmpStrDescr = [projectDescr stringValue] ; 275 NSString *tmpStrTags = [projectLocation stringValue] ; 324 276 325 277 [self pLog:[NSString stringWithFormat:@"Starting Video Out to Icecast2 server:\n http://%@:%d/%@\n",tmpIcecastIp,tmpIcecastPort,tmpIcecastMount]] ; 326 278 /* 327 279 char *cip = (char*)malloc(sizeof(char)*99); 328 char *cmount = (char*)malloc(sizeof(char)* 99);280 char *cmount = (char*)malloc(sizeof(char)*strlen); 329 281 strcpy(cip, [tmpIcecastIp UTF8String]) ; 330 282 strcpy(cmount, [tmpIcecastMount UTF8String]) ; 331 332 int iceConnect = myOggfwd_init(cip, tmpIcecastPort, cmount) ; 283 */ 284 const char* cip = [tmpIcecastIp UTF8String]; 285 const char* cmount = [tmpIcecastMount UTF8String]; 286 const char* cname = [tmpStrName UTF8String]; 287 const char* cdesc = [tmpStrDescr UTF8String]; 288 const char* ctags = [tmpStrTags UTF8String]; 289 const char* curl = [[NSString stringWithFormat:@"http://wiki.citu.info/users/%@\n",tmpStrAuthor] UTF8String] ; // TODO url-escape 290 291 [self pLog:[NSString stringWithFormat:@"Tags: %@\nDesc: %@\n",tmpStrTags,tmpStrDescr]] ; 292 293 int iceConnect = myOggfwd_init(cip, tmpIcecastPort, cmount, cdesc, ctags, cname, curl) ; 333 294 334 295 if(iceConnect==1) { … … 387 348 //[showZoneButton setEnabled:NO]; 388 349 350 [outBitrateTF setEnabled:NO]; 351 [outQualityTF setEnabled:NO]; 352 [outIcecastIPTF setEnabled:NO]; 353 [outIcecastPortTF setEnabled:NO]; 354 [outIcecastMountTF setEnabled:NO]; 355 [projectName setEnabled:NO]; 356 [projectAuthor setEnabled:NO]; 357 [projectLocation setEnabled:NO]; 358 [projectDescr setEnabled:NO]; 359 389 360 [self setCaptureWindowMode:TRUE] ; 390 361 [mCaptureTarget makeKeyAndOrderFront:self]; … … 432 403 [stopOutButton setEnabled:NO]; 433 404 [showZoneButton setEnabled:YES]; 434 405 406 [outBitrateTF setEnabled:YES]; 407 [outQualityTF setEnabled:YES]; 408 [outIcecastIPTF setEnabled:YES]; 409 [outIcecastPortTF setEnabled:YES]; 410 [outIcecastMountTF setEnabled:YES]; 411 [projectName setEnabled:YES]; 412 [projectAuthor setEnabled:YES]; 413 [projectLocation setEnabled:YES]; 414 [projectDescr setEnabled:YES]; 415 435 416 [mCaptureTarget close]; 436 417 } -
oggzcap/src/videoout/encoder_example.c
r0a70e0d r2080ee9 234 234 shout_t *myShout; 235 235 //FILE *outTestFile ; 236 int myOggfwd_init( char* outIceIp, int outIcePort, char* outIceMount ) { 236 int myOggfwd_init( const char* outIceIp, int outIcePort, const char* outIceMount, 237 const char *description, const char *genre, const char *name, const char *url ) { 237 238 238 239 int res = 0 ; 239 240 240 unsigned int pFlag;241 char *description, *genre, *name, *url ;242 241 unsigned short port = outIcePort ; 243 244 pFlag = 0;245 description = "-" ;246 genre = "-" ;247 name = "InOut Video" ;248 url = "-" ;249 242 250 243 if ((myShout = shout_new()) == NULL) printf("oggfwd - Error - allocate pb%s\n") ; … … 254 247 if (shout_set_mount(myShout, outIceMount) != SHOUTERR_SUCCESS) printf("oggfwd - Error - look at the code to know...\n") ; 255 248 shout_set_format(myShout, SHOUT_FORMAT_VORBIS); 256 shout_set_public(myShout, pFlag);249 shout_set_public(myShout, 1); 257 250 258 251 if (description) shout_set_description(myShout, description); 259 if (genre) shout_set_genre(myShout, genre);260 if (name) shout_set_name(myShout, name);261 if (url) shout_set_url(myShout, url);252 if (genre) shout_set_genre(myShout, genre); 253 if (name) shout_set_name(myShout, name); 254 if (url) shout_set_url(myShout, url); 262 255 263 256 //printf("oggfwd - Trying to connect\n") ;
