Project

General

Profile

Actions

Support Request #3472

closed

Transmission between filterns via IMediaSample in ADTF 2.x

Added by hidden almost 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Customer:
MAN
Department:
Requester's Priority:
Normal
Support Level:
2nd Level
Resolution:
Solved Issue
Product Issue Numbers:
Affected Products:
Platform:
Windows 7 64bit
Topic:
ADTF::Streaming
FAQ Links:

Description

Supportanfrage:

Ich habe eine allgemeine Frage bezüglich der Datenübertragung zwischen Filtern mittels IMediaSample in ADTF 2.x.
Wird bei der Übertragung eine Kopie der Daten an den Empfänger übergeben oder wird auf den Speicherbereich verwiesen in dem die originalen Daten abgelegt sind?

Welche Vorteile bzw. Nachteile bietet die jeweilige Methode?

Lösung:

Beides ist möglich, standardmäßig wird eine Kopie übertragen.

Siehe hierzu das MSF_Reference Flag in der ADTF 2 Doku: MSF_Reference

Vor-/Nachteile können dem DokuLink Pins for Filters: Sending Data entnommen werden:

Warning:
The flag MSF_Reference has to be used with great caution. Its effect is that the data is not copied; instead only a reference to the external memory is saved in the MediaSample. The data may therefore not be changed as long as the MediaSample has not yet been deleted!

The MSF_Reference flag was introduced for the optimization of an entire application in order to prevent the repeated copying of storage ranges. Here it is very important that this is taken into account in the whole application and by all Filters. The use is unproblematic as long as no Filter buffers this MediaSample. The ADTF default Filters (i.e. QueueRecorder) take this into account, which create a copy in every case in order to prevent a collision through MSF_Reference. It is important for other "User" applications that the programmers of Filters that must absolutely use storage references agree with one another.

Actions

Also available in: Atom PDF