Sorry for the slow review of this series.
The tests here are a little difficult to keep track of. I have a couple suggestions:
* when writing a lot of very long tests (e.g. each comprising a couple dozen lines) in the same function, I find it quite helpful to separate them with comments explaining what each test is trying to prove, both in order to help visually clarify where individual tests begin, and to ease the burden of piecing together what a large amount of code is supposed to do. test_connect_direct() in quartz:filtergraph might help show what I mean, if that's not clear.
* The asynchronous calls to ammediastream_allocate_sample() plus ammediastream_receive() could probably use a helper function, along the lines of send_frame_time() in quartz:videorenderer. That'd reduce the amount of boilerplate to skim over, plus effect some deduplication.