From: Craig S. <cso...@us...> - 2006-10-31 04:41:51
|
Update of /cvsroot/openh323/opal/samples/simple In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv8327/samples/simple Modified Files: main.cxx Log Message: Add support for new methods needed for vidfiledevices Index: main.cxx =================================================================== RCS file: /cvsroot/openh323/opal/samples/simple/main.cxx,v retrieving revision 2.78 retrieving revision 2.79 diff -C2 -d -r2.78 -r2.79 *** main.cxx 28 Oct 2006 00:39:42 -0000 2.78 --- main.cxx 31 Oct 2006 04:41:47 -0000 2.79 *************** *** 23,26 **** --- 23,29 ---- * * $Log$ + * Revision 2.79 2006/10/31 04:41:47 csoutheren + * Add support for new methods needed for vidfiledevices + * * Revision 2.78 2006/10/28 00:39:42 rjongbloed * Added argument to set country on LID *************** *** 450,453 **** --- 453,458 ---- "-tx-video." "-no-tx-video." "-grabber:" + "-grabdevice:" + "-grabchannel:" "-display:" #if P_EXPAT *************** *** 486,491 **** " --no-rx-video : Don't start receiving video immediately.\n" " --no-tx-video : Don't start transmitting video immediately.\n" ! " --grabber dev : Set the video grabber device.\n" ! " --display dev : Set the video display device.\n" "\n" --- 491,498 ---- " --no-rx-video : Don't start receiving video immediately.\n" " --no-tx-video : Don't start transmitting video immediately.\n" ! " --grabber dev : Set the video grabber driver.\n" ! " --grabdevice dev : Set the video grabber device.\n" ! " --grabchanel num : Set the video grabber device channel.\n" ! " --display dev : Set the video display driver.\n" "\n" *************** *** 685,688 **** --- 692,704 ---- BOOL MyManager::Initialise(PArgList & args) { + OpalMediaFormat fmt("H.261-CIF"); + if (!fmt.IsValid()) + cerr << "cannot find format" << endl; + else { + fmt.SetOptionInteger(OpalVideoFormat::EncodingQualityOption, 16); + fmt.SetOptionBoolean(OpalVideoFormat::AdaptivePacketDelayOption, TRUE); + OpalMediaFormat::SetRegisteredMediaFormat(fmt); + } + #if OPAL_VIDEO // Set the various global options *************** *** 699,705 **** PVideoDevice::OpenArgs video = GetVideoInputDevice(); video.deviceName = args.GetOptionString("grabber"); if (!SetVideoInputDevice(video)) { ! cerr << "error: cannot set video input device " << video.deviceName ! << "options are:" << setfill(',') << PVideoInputDevice::GetDriversDeviceNames("") << endl; } } --- 715,724 ---- PVideoDevice::OpenArgs video = GetVideoInputDevice(); video.deviceName = args.GetOptionString("grabber"); + video.filename = args.GetOptionString("grabdevice"); + video.channelNumber = args.GetOptionString("grabchannel").AsInteger(); if (!SetVideoInputDevice(video)) { ! cout << "Unknown grabber device " << video.deviceName << endl; ! cout << setfill(',') << PVideoInputDevice::GetDriversDeviceNames("") << endl; ! return FALSE; } } |