Wednesday, 7 August 2013

WindowPhone 7.x | How to correctly close/pause video recording when app going to background

WindowPhone 7.x | How to correctly close/pause video recording when app
going to background

When I lock my phone during video recording, my app hung with stack trace
as below:
System.Windows.dll!MS.Internal.NativePhotoMethods.CapMan_Disconnect(int
dwSeq)
System.Windows.dll!System.Windows.Media.CaptureSource.CaptureThread() +
0x2dd bytes
mscorlib.dll!System.Threading.ThreadHelper.ThreadStartHelper(System.Threading.ThreadHelper
t) + 0x1d bytes
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart_Context(object
state) + 0xb bytes
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext
executionContext, System.Threading.ContextCallback callback, object state)
+ 0x63 bytes
mscorlib.dll!System.Threading.ThreadHelper.ThreadStartHelper() + 0x2a bytes
How can I prevent hanging and correctly pause/close the CaptureSource?

No comments:

Post a Comment