×

Discussion Board

Page 3 of 3 FirstFirst 123
Results 31 to 34 of 34
  1. #31
    Registered User
    Join Date
    Oct 2011
    Posts
    30

    Re: troubles on showing argb data in a surface control

    Quote Originally Posted by yan_ View Post
    yes it's because you remove concurrent access (i'm pretty sure shake come from concurrent access. I've ever had same problem with industrial camera) like only ui thread acces GetPreviewBufferArgb and call CreateTexture.

    I don't know what is better. Maybe something between your solution and mine. With your solution if something lock the ui thread for 1 second you will stack 25 call in its eventloop. But you need only one when ui will be unlocked.
    I had solved this issue by implemented a thread with manuresetevent:
    Code:
    while (true)
                {
                    ManualResetEvent resetEvent = new ManualResetEvent(true);
                    resetEvent.WaitOne();
                    int[] _buffer = _viewModel.GetPreviewBuffer();
                    resetEvent.Reset(); 
                    Deployment.Current.Dispatcher.BeginInvoke(delegate
                    {
                        _d3dInterop.CreateTexture(out _buffer[0], (int)_viewModel.PreviewResolution.Width, (int)_viewModel.PreviewResolution.Height/*, 90.0f, 1.0f*/);
                        resetEvent.Set();
                    });
                }
    but there issue if square was still not solved yet. the buffer data looked like was stretched to fill the hole screen, and it still didn't work atfer I changed the viewport size to the screen resolution

  2. #32
    Nokia Developer Champion
    Join Date
    Nov 2011
    Location
    la bouexiere, france
    Posts
    474

    Re: troubles on showing argb data in a surface control

    Hi.
    I thinks your loop doesn't resolve something because you create a new resetEvent at each step and you stack a lot of command. Declare it before loop.
    Maybe a timer or a DispatcherTimer could be more simple. But it haven't only one best solution.

    With code i give, you can't display image with correct ratio? i don't understand your problem.

  3. #33
    Registered User
    Join Date
    Oct 2011
    Posts
    30

    Re: troubles on showing argb data in a surface control

    Quote Originally Posted by yan_ View Post
    Hi.
    I thinks your loop doesn't resolve something because you create a new resetEvent at each step and you stack a lot of command. Declare it before loop.
    Maybe a timer or a DispatcherTimer could be more simple. But it haven't only one best solution.

    With code i give, you can't display image with correct ratio? i don't understand your problem.
    That's my bad! I forgot to change the rendertarget size, as default, it was the screen resolution, after I changed the value to the PhotoCaptureDevice.Previewresolution, it worked fine!

  4. #34
    Nokia Developer Champion
    Join Date
    Nov 2011
    Location
    la bouexiere, france
    Posts
    474

    Re: troubles on showing argb data in a surface control

    Cool.

    A last tip. To have a captured picture orientation independent of device orientation, you can fix it with PhotoCaptureDive properties :
    Code:
    if (m_cameraType == CameraSensorLocation.Back)
         m_captureDevice.SetProperty(KnownCameraGeneralProperties.SpecifiedCaptureOrientation, 270);
    else
         m_captureDevice.SetProperty(KnownCameraGeneralProperties.SpecifiedCaptureOrientation, 90);
    
    m_captureDevice.SetProperty(KnownCameraGeneralProperties.EncodeWithOrientation, 0);

Similar Threads

  1. VKB is not showing up for CEikEdwin control - 5th Edition
    By ruchirvasavada in forum Symbian User Interface
    Replies: 1
    Last Post: 2011-01-06, 03:31
  2. problem:Browser control is not showing on N73 device
    By rahul.shalik.makode in forum Symbian
    Replies: 0
    Last Post: 2010-05-28, 07:24
  3. Volume control while showing a dialog
    By enigma_007 in forum Symbian
    Replies: 1
    Last Post: 2009-10-31, 08:20
  4. Copying content from Pixmap surface to window surface
    By mustaf in forum Symbian Media (Closed)
    Replies: 4
    Last Post: 2009-01-15, 06:58
  5. Control faded on showing menu pane
    By strike_noir in forum Symbian User Interface
    Replies: 5
    Last Post: 2008-10-16, 07:58

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×