c++ - Alternative way to program instead of using ISpecifyPropertyPages in Directshow -
c++ - Alternative way to program instead of using ISpecifyPropertyPages in Directshow -
to start off i'm terrible @ directshow stuff. have no clue how works. , i'm trying access "value" photographic camera that's called area of involvement x , y, @ to the lowest degree that's called in photographic camera programme came camera. moves the camera's view left right or top bottom (the photographic camera not physically move). problem can't find how in directshow.
but, luckily, came across programme source code had access value using directshow. so, after looking through code found , code looked this..
case idc_device_setup: { if(gcap.pvcap == null) break; ispecifypropertypages *pspec; cauuid cauuid; hr = gcap.pvcap->queryinterface(iid_ispecifypropertypages, (void **)&pspec); if(hr == s_ok) { hr = pspec->getpages(&cauuid); hr = olecreatepropertyframe(ghwndapp, 30, 30, null, 1, (iunknown **)&gcap.pvcap, cauuid.celems, (guid *)cauuid.pelems, 0, 0, null); cotaskmemfree(cauuid.pelems); pspec->release(); } break; } problem button , when click on it, creates window of properties of photographic camera setting don't need access to. basically, there 2 problems. first, don't need want create window, want access value programmatically , second, want access specific part of values property page. there way that?
the iamcameracontrol interface seems come nearest want, it's not want. can't remember there standard directshow interface want.
the property page see ibasefilter implemented driver filter. driver free whatever wants knowledge internal interfaces. there no need exhibit these interfaces external users. if lucky photographic camera vendor's property page using com interface vendor willing document can utilize it.
so inquire photographic camera vendor if provide official com interface use. if don't, seek reverse engineer (not easy) , hope don't alter interface next software release.
regarding general question given in comments:
com programming interface defines how create objects, how define interface (e.g. methods) of these objects , how phone call methods on objects.
directshow based on com. directshow defines several com interfaces ifiltergraph container devices , filters use. com interface defined directshow ibasefilter base of operations interface filters (devices, transformation filters) use.
the individual com objects implemented directshow, device specific objects ibasefilter capturing device implemented dll delivered hardware vendor.
in case gcap.pvcap ibasefilter interface capture device. in com objects can implement multiple interfaces. in code pvcap queried (queryinterface) if supports interface ispecifypropertypages. if case, olepropertyframe created displays property page implemented photographic camera object. finish command goes photographic camera object implementing ispecifypropertypages interface. when photographic camera object displays property page can straight access it's own properties. can create properties available externally exporting interface imycameraspecificinterface.
c++ camera directshow
Comments
Post a Comment