Re: Bug 244016: Clicking "..." on a device control after encoding can cause a
Steve McMillen <[email protected]>
| Newsgroups | gmane.comp.multimedia.helix.devel |
|---|---|
| Organization | RealNetworks |
| Message-ID | <[email protected]> |
This I do have good documentation on this from when we added ParInputs. There can only be one any media type (audio or video or in future others such as events). -- Steve on 6/23/09 6:34 AM Eric Hyche wrote the following: > In a parInput, will there always only be just one audio input > and one video input? Could there ever be more than one audio > input? > > If not (and there's always just one audio input in a parInput), > then these changes look good. > > Eric > > ======================================= > Eric Hyche ([email protected]) > Principal Engineer > RealNetworks, Inc. > > > >> -----Original Message----- >> From: [email protected] [mailto:[email protected]] >> Sent: Tuesday, June 23, 2009 3:29 AM >> To: [email protected]; [email protected] >> Subject: CR:Bug 244016: Clicking "..." on a device control after encoding can cause a >> >> Synopsis >> ======== >> Bug 244016: Clicking "..." on a device control after encoding can cause a >> SDK error or unhandled exception. >> >> Branches: PRODUCER_13_0_RN and HEAD. >> Suggested Reviewer: Anyone. >> >> >> Description >> =========== >> Problem was that Active-x control was adding a audio gain prefilter to >> <parInput>, while new xsd only supports adding prefilter to input and not >> parInput. >> >> Changed Active-x control to add prefilter to first audio input in par >> inputs and changed logic to check par inputs for pre-filter. >> Need to check further, if adding of prefilters to par inputs should be >> allowed. >> >> >> Files Affected >> ============== >> client/encodesvc/activex/ctrl/ProducerCtrl.cpp >> >> Testing Performed >> ================= >> Tested with capture and file encode jobs >> >> Performance Tests: >> - None >> >> Platforms Tested: win32-i386-vc7 >> Build verified: win32-i386-vc7 >> >> QA Hints >> ======== >> Please test bug repro with prefilters. >> >> Index: ProducerCtrl.cpp >> =================================================================== >> RCS file: /cvsroot/client/encodesvc/activex/ctrl/ProducerCtrl.cpp,v >> retrieving revision 1.3.2.1 >> diff -u -r1.3.2.1 ProducerCtrl.cpp >> --- ProducerCtrl.cpp 5 Jun 2009 19:57:58 -0000 1.3.2.1 >> +++ ProducerCtrl.cpp 23 Jun 2009 06:12:41 -0000 >> @@ -6654,6 +6654,60 @@ >> } >> } >> >> + if (!bFoundAudioGain) >> + { >> + HXBOOL bInputIsParallelGroup = FALSE; >> + if (SUCCEEDED(res)&& spInput) >> + { >> + const char* pkszPluginType = NULL; >> + res = spInput->GetString(kPropPluginType,&pkszPluginType); >> + if (SUCCEEDED(res)&& >> + (strcmp(pkszPluginType, kValuePluginTypeInputParGroup) == 0)) >> + { >> + bInputIsParallelGroup = TRUE; >> + } >> + } >> + >> + IHXTInput2Ptr spInputGroup; >> + if ( SUCCEEDED(res)&& bInputIsParallelGroup) >> + { >> + spInput->QueryInterface( IID_IHXTInput2, >> (void**)spInputGroup.Adopt() ); >> + if ( spInputGroup ) >> + { >> + //Input Group present >> + UINT32 uiNumInputs = spInputGroup->GetInputCount(); >> + IHXTInputPtr spSingleInputPtr; >> + >> + for (UINT32 i=0; SUCCEEDED(res)&& i<uiNumInputs; i++) >> + { >> + res = spInputGroup->GetInput( i, spSingleInputPtr.Adopt() ); >> + if ( SUCCEEDED( res ) ) >> + { >> + UINT32 ulNumPrefilters = spSingleInputPtr->GetPrefilterCount(); >> + const char* pkszPluginName = NULL; >> + >> + for ( UINT32 i=0; i<ulNumPrefilters; ++i ) >> + { >> + res = spInput->GetPrefilter( i, spPrefilter.Adopt() ); >> + >> + if ( SUCCEEDED( res ) ) >> + { >> + spPrefilter->GetString( kPropPluginName ,&pkszPluginName); >> + >> + if ( strcmp( pkszPluginName, kValuePluginNamePrefilterAudioGain) == 0 ) >> + { >> + bFoundAudioGain = TRUE; >> + break; >> + } >> + } >> + } >> + } >> + } >> + } >> + } >> + } >> + >> + >> if ( SUCCEEDED( res )&& bFoundAudioGain ) >> { >> HX_RELEASE(*ppPrefilter); >> @@ -6681,6 +6735,8 @@ >> CProducerCtrl::AddAudioGainPrefilter(double lfAudioGain) >> { >> VARIANT_BOOL bIsRunning = VARIANT_FALSE; >> + IHXTPrefilterPtr spPrefilter; >> + >> get_IsRunning(&bIsRunning); >> if (bIsRunning) >> { >> @@ -6719,16 +6775,54 @@ >> // Create the prefilter >> if ( SUCCEEDED( res ) ) >> { >> - IHXTPrefilterPtr spPrefilter; >> res = HXBuildInstance(m_spFactory, IID_IHXTPrefilter, spBag, >> (IUnknown**)spPrefilter.Adopt()); >> HX_ASSERT(res == HXR_OK); >> - if (SUCCEEDED(res)) >> + } >> + } >> + } >> + >> + HXBOOL bInputIsParallelGroup = FALSE; >> + if (SUCCEEDED(res)&& spInput) >> + { >> + const char* pkszPluginType = NULL; >> + res = spInput->GetString(kPropPluginType,&pkszPluginType); >> + if (SUCCEEDED(res)&& >> + (strcmp(pkszPluginType, kValuePluginTypeInputParGroup) == 0)) >> + { >> + bInputIsParallelGroup = TRUE; >> + } >> + } >> + >> + IHXTInput2Ptr spInputGroup; >> + if ( SUCCEEDED(res)&& bInputIsParallelGroup) >> + { >> + spInput->QueryInterface( IID_IHXTInput2, (void**)spInputGroup.Adopt() ); >> + if ( spInputGroup ) >> + { >> + //Input Group present >> + UINT32 uiNumInputs = spInputGroup->GetInputCount(); >> + IHXTInputPtr spSingleInputPtr; >> + >> + for (UINT32 i=0; i< uiNumInputs; i++) >> + { >> + res = spInputGroup->GetInput( i, spSingleInputPtr.Adopt() ); >> + if ( spSingleInputPtr ) >> { >> - res = spInput->AddPrefilter( spPrefilter ); >> + HXBOOL bHasAudio = FALSE; >> + spSingleInputPtr->GetBool(kPropHasAudio,&bHasAudio); >> + if (bHasAudio) >> + { >> + res = spSingleInputPtr->AddPrefilter( spPrefilter ); >> + break; >> + } >> } >> } >> } >> } >> + else if (SUCCEEDED(res)) >> + { >> + res = spInput->AddPrefilter( spPrefilter ); >> + } >> >> return res; >> } >> > >