Metodo CSourceSeeking.QueryPreferredFormat

[La funzionalità associata a questa pagina, DirectShow, è una funzionalità legacy. È stata sostituita da MediaPlayer, FMMediaEngine e Audio/Video Capture in Media Foundation. Queste funzionalità sono state ottimizzate per Windows 10 e Windows 11. Microsoft consiglia vivamente che il nuovo codice usi MediaPlayer, FMMediaEngine e Audio/Video Capture in Media Foundation anziché DirectShow, quando possibile. Microsoft suggerisce che il codice esistente che usa le API legacy venga riscritto per usare le nuove API, se possibile.

Il QueryPreferredFormat metodo recupera il formato ora preferito dell'oggetto. Questo metodo implementa il metodo IMediaSeeking::QueryPreferredFormat .

Sintassi

HRESULT QueryPreferredFormat(
   GUID *pFormat
);

Parametri

pFormat

Puntatore a una variabile che riceve un GUID di formato ora. Vedere GUID formato ora.

Valore restituito

Restituisce uno dei valori HRESULT elencati nella tabella seguente.

Codice restituito Descrizione
S_OK
Operazione riuscita
E_POINTER
Valore puntatore NULL

Commenti

L'unico formato di tempo supportato dalla classe base è TIME_FORMAT_MEDIA_TIME (100-nanosecondi).

Requisiti

Requisito Valore
Intestazione
Ctlutil.h (includere Streams.h)
Libreria
Strmbase.lib (build al dettaglio);
Strmbasd.lib (build di debug)

Vedi anche

Classe CSourceSeeking