Click here to Skip to main content
15,893,161 members
Home / Discussions / Mobile
   

Mobile

 
QuestionTransparent image problem in Compact Framework 3.5 Pin
Subasish_CodeProject10-Jul-08 20:51
Subasish_CodeProject10-Jul-08 20:51 
QuestionAdd animated gif image to Smart Device Application Pin
Dushan12310-Jul-08 19:00
Dushan12310-Jul-08 19:00 
AnswerRe: Add animated gif image to Smart Device Application Pin
Iain Clarke, Warrior Programmer1-Aug-08 0:18
Iain Clarke, Warrior Programmer1-Aug-08 0:18 
Questionproblem with java webservice and WM5 Pin
Newbie_Toy7-Jul-08 21:36
Newbie_Toy7-Jul-08 21:36 
QuestionGDI+ for WM5.0 with C++ (native) [modified] Pin
akirilov7-Jul-08 20:43
akirilov7-Jul-08 20:43 
AnswerRe: GDI+ for WM5.0 with C++ (native) Pin
tapan.x.bansal25-Jul-08 6:15
tapan.x.bansal25-Jul-08 6:15 
GeneralRe: GDI+ for WM5.0 with C++ (native) Pin
akirilov30-Jul-08 20:30
akirilov30-Jul-08 20:30 
Questioncamera capture using wimoNative dll Pin
Samuel Ong3-Jul-08 9:04
Samuel Ong3-Jul-08 9:04 
Hi,

Im trying to do video streaming by using the dll provided in the wimo library. The idea is to take snapshots of the video stream,

However, every image taken by wimoNative dll when saved to a file, always gives me a black blank image.
Can someone tell me wats wrong pls?

thanks in advance.
badly need help

==================== Code from wimoNative dll=====
// Used to open the camera. We build the DirectShow graph, instantiate
// and hook up all of the Pins and return the handle to the camera object.
extern "C" __declspec(dllexport) HRESULT OpenCamera(DWORD dwResolutionId, HANDLE* hCamera)
{
CameraInfo* pci = new CameraInfo();

HRESULT hr = S_OK;

// create the Graph and the GraphBuilder.
pci->pGraph.CoCreateInstance(CLSID_FilterGraph);
pci->pCaptureBuilder.CoCreateInstance(CLSID_CaptureGraphBuilder);

// set the graph for which the GraphBuilder is going to work on.
pci->pCaptureBuilder->SetFiltergraph(pci->pGraph);

// get the IMediaControl interface
pci->pGraph.QueryInterface( &pci->pMedia );


// We want a video capture filter
pci->pVideoCaptureFilter.CoCreateInstance( CLSID_VideoCapture );
pci->pVideoCaptureFilter.QueryInterface( &pci->pPropertyBag );
pci->PropBag.Write( L"VCapName", &GetCameraDeviceName());
pci->pPropertyBag->Load( &pci->PropBag, NULL );

// set the filter to capture at the resolution specified.
SetCameraResolution((HANDLE)pci, dwResolutionId);

// add this video capture filter that we just set up to the main graph
hr = pci->pGraph->AddFilter(pci->pVideoCaptureFilter, L"Video Capture Source");

// create the ImageSinkFilter. This is the filter that takes the image from the video
// stream and saves it to a file when the graph is "triggered"
hr = pci->pImageSinkFilter.CoCreateInstance( CLSID_IMGSinkFilter );
hr = pci->pGraph->AddFilter( pci->pImageSinkFilter, L"Still image filter" );
hr = pci->pCaptureBuilder->RenderStream(
&PIN_CATEGORY_STILL,
&MEDIATYPE_Video,
pci->pVideoCaptureFilter,
NULL,
pci->pImageSinkFilter );

hr = pci->pImageSinkFilter.QueryInterface( &pci->pFileSinkFilter );


// create the video control instance so that we can trigger the ImageSink
// to take a snapshot
hr = pci->pVideoCaptureFilter.QueryInterface( &pci->pVideoControl );
hr = pci->pVideoCaptureFilter.QueryInterface( &pci->pUnkCaptureFilter );

hr = pci->pCaptureBuilder->FindPin(
pci->pUnkCaptureFilter,
PINDIR_OUTPUT,
&PIN_CATEGORY_STILL,
&MEDIATYPE_Video,
FALSE,
0,
&pci->pStillPin );


// internal flag noting that the graph is not running at the moment.
pci->bRunning = FALSE;

*hCamera = (HANDLE)pci;

return hr;
}

// TakePicture "triggers" the filter graph, which causes a snapshot to be saved into
// the specified file.
//
// hCamera is the handle to the camera
// szFileName is the filename to which to save the image
extern "C" __declspec(dllexport) HRESULT TakePicture(HANDLE hCamera, LPTSTR szFileName)
{
HRESULT hr = S_OK;
CameraInfo* pci = (CameraInfo*)hCamera;

// if the camera is not already running, let's turn it on.
if (!pci->bRunning)
{
int msgboxID = MessageBox(
NULL,
(LPCWSTR)L"Not Running",
(LPCWSTR)L"Bugger",
MB_ICONWARNING | MB_DEFBUTTON2
);
hr = pci->pMedia->Run();
pci->bRunning = TRUE;

if (!pci->bRunning){
int msgboxID = MessageBox(
NULL,
(LPCWSTR)L"Not Running",
(LPCWSTR)L"Bugger",
MB_ICONWARNING | MB_DEFBUTTON2
);
}
}

// sets the filename to save the image as and then triggers the snapshot
hr = pci->pFileSinkFilter->SetFileName( szFileName, NULL );
CHK( m_pCaptureGraphBuilder->FindPin( pUnkCaptureFilter, PINDIR_OUTPUT, &PIN_CATEGORY_STILL, &MEDIATYPE_Video, FALSE, 0, &pStillPin ));
CHK( m_pVideoCaptureFilter.QueryInterface( &pVideoControl ));
hr = pci->pVideoControl->SetMode( pci->pStillPin, VideoControlFlag_Trigger );

return hr;
}

==============================End============
QuestionWindows CE emulator Pin
iayd3-Jul-08 2:23
iayd3-Jul-08 2:23 
AnswerRe: Windows CE emulator Pin
Trupti Mehta4-Jul-08 4:27
Trupti Mehta4-Jul-08 4:27 
Questionwhich institute Pin
Ebube2-Jul-08 23:03
Ebube2-Jul-08 23:03 
AnswerRe: which institute Pin
hereicome16-Jul-08 1:42
hereicome16-Jul-08 1:42 
Questionunzipp files on a pocket pc with Visual Sudio .net 2003 C# Pin
Ana Bela2-Jul-08 22:37
Ana Bela2-Jul-08 22:37 
AnswerRe: unzipp files on a pocket pc with Visual Sudio .net 2003 C# Pin
Arjun Marwaha9-Jul-08 19:12
Arjun Marwaha9-Jul-08 19:12 
QuestionNew Smartphone developer Pin
nbugalia30-Jun-08 21:00
nbugalia30-Jun-08 21:00 
Questionconnect with hidden SSID Pin
rituparn30-Jun-08 12:22
rituparn30-Jun-08 12:22 
AnswerRe: connect with hidden SSID Pin
Lju23-Jul-08 10:39
Lju23-Jul-08 10:39 
Questionmobile programming tranning Pin
Ebube30-Jun-08 0:57
Ebube30-Jun-08 0:57 
AnswerRe: mobile programming tranning Pin
Arjun Marwaha9-Jul-08 19:14
Arjun Marwaha9-Jul-08 19:14 
GeneralRe: mobile programming tranning Pin
hereicome16-Jul-08 1:45
hereicome16-Jul-08 1:45 
Questionimsi or msisdn or any other uniqe thing in mobile Pin
CreativeR8629-Jun-08 1:46
CreativeR8629-Jun-08 1:46 
AnswerRe: imsi or msisdn or any other uniqe thing in mobile Pin
Pavel Klocek3-Jul-08 10:28
Pavel Klocek3-Jul-08 10:28 
Questionhow to control flashlight under window mobile 5? Pin
fansy_fs27-Jun-08 6:47
fansy_fs27-Jun-08 6:47 
AnswerRe: how to control flashlight under window mobile 5? Pin
akirilov30-Jun-08 21:15
akirilov30-Jun-08 21:15 
GeneralRe: how to control flashlight under window mobile 5? Pin
fansy_fs1-Jul-08 5:03
fansy_fs1-Jul-08 5:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.