[datatype-dev] CR: Large File Support and rolling
Jamie Gordon jgordon at real.comok On 2/7/2011 10:40 AM, Sujeet Kharkar wrote: > Synopsis > ======== > Large File support and rolling merging changes to HEAD. > > Suggested Reviewer:Jamie > > Branches: HEAD > > > Description > =========== > This fix merges changes made to PRODUCER_14_0_RN to head. > This diff allows creation of use of c064 atom for chunk offset with 32 > bit build. > co64 atom is used only when offsets exceed MAX_UINT32 or else stco atom > is used. > Existing behavior with #if defined(_LONG_IS_64) || defined(_WIN64) of > always creating co64 is not changed. > > Was noticing crash or memory corruption in debugger after rolling. > It was because one of atom was not Addref. > @@ -2351,6 +2645,7 @@ > > HX_RELEASE(m_pRTP); > m_pRTP = pRTP; > + m_pRTP->AddRef(); > > After that, noticed that merged files video did not start on key frame > and rolled file was not in synch. > Made changes to make new file video stream start on keyframe. > m_uiFirstKeyFrameForRotation is streamId for first video stream, if > video stream is present or else it is first stream. > If m_bRotateAfterNextKeyFrame is set then on when a packet in > CMP4StreamMixer::SetPacket, we check if streamID matches > m_uiFirstKeyFrameForRotation > and if it is a keyframe. On meeting above condition we save keyframes > for all streams. > Once keyframe for all streams are received we do the rotation. > We save time difference between first keyframe of all stream and use > that time to add edts atom, this ensures that audio and vidoe are in synch. > > Known issue: > Rolled file plays fine with QT and vlc player but has issues when > playing with realplayer. > I think realplayer is not able to correctly handle edts atom. To > isolate, I added edts atom via mp4box -delay option and resultant file > had same issues with RealPlayer. > Audio seemed like it had a echo. While streaming from server. QT player > was fine but RealPlayer did buffering initially and then played fine. > (There was no echo.) > Also audio distortion with RealPlayer is present when audio video are > off by 4sec or more and is not seen for around 3 sec. I am going look > into fixing producer to not have such large a/v drift. > > Files affected > ============== > datatype/mp4/filewriter/mp4atoms.h > datatype/mp4/filewriter/mp4sm.cpp > datatype/mp4/filewriter/mp4sm.h > > Tested > ====== > Tested with #define to create co64 atom files, and stco atom files and > tested rolling. > > QA hints > ========= > Please test it with handsets.