# access LiveStreampacketizer Cupertino programmatically?

**URL:** https://community.wowza.com/t/access-livestreampacketizer-cupertino-programmatically/37020
**Category:** Wowza Streaming Engine
**Created:** [November 4, 2011, 9:02am UTC](https://community.wowza.com/t/access-livestreampacketizer-cupertino-programmatically/37020 "2011-11-04T09:02:08Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![fatos\_bekteshi](https://avatars.discourse-cdn.com/v4/letter/f/2acd7d/32.png) [@fatos\_bekteshi](https://community.wowza.com/u/fatos_bekteshi)
#### Post date: [November 4, 2011, 9:02am UTC](https://community.wowza.com/t/access-livestreampacketizer-cupertino-programmatically/37020/1 "2011-11-04T09:02:08Z")

</div>

Hi,

if on application.xml i configure LiveStreamPacketizers as below:

**cupertinostreamingpacketizer,smoothstreamingpacketizer,sanjosestreamingpacketizer**

this seems to do some useful analysis to the incoming stream ie. cupertinostreaming packetizer displays info on the wowza console like:

video codec:h264: IsCompatible true

is there away that i can get a refrence to the LiveStreampacketizerCupertino programmatically and check these conditions. ie:

LiveStreampacketizerCupertino.IsIphoneCompatible()

LiveStreampacketizerCupertino.GetBaseLineUsed() etc.

LiveStreampacketizerCupertino seems to now if the stream is Iphone/Ipad compatible but would be great if programatically i can read these properties.

thanks

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [November 4, 2011, 9:24pm UTC](https://community.wowza.com/t/access-livestreampacketizer-cupertino-programmatically/37020/2 "2011-11-04T21:24:44Z")

</div>

You can get audio and video codec info from a stream when it starts with the IMediaStreamActionNotify3 interface:

[https://www.wowza.com/docs/how-to-use-imediastreamactionnotify3-interface-to-listen-for-rtmp-stream-events-includes-codec-info](https://www.wowza.com/docs/how-to-use-imediastreamactionnotify3-interface-to-listen-for-rtmp-stream-events-includes-codec-info)

Richard

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [November 7, 2011, 8:20pm UTC](https://community.wowza.com/t/access-livestreampacketizer-cupertino-programmatically/37020/3 "2011-11-07T20:20:31Z")

</div>

The same method should work. I’m not sure how else.

Richard

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [November 8, 2011, 2:41pm UTC](https://community.wowza.com/t/access-livestreampacketizer-cupertino-programmatically/37020/4 "2011-11-08T14:41:26Z")

</div>

You have enough info to do it. Set two Boolean variables to false, then set one to true if onCodecInfoAudio runs, and the other to true if onCodecInfoVideo runs. There might be a better way, but that can work

```auto
Boolean isAudio = false;
Boolean isVideo = false;

```

Richard

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [November 8, 2011, 8:34pm UTC](https://community.wowza.com/t/access-livestreampacketizer-cupertino-programmatically/37020/5 "2011-11-08T20:34:11Z")

</div>

It is just Wowza 3. Everything new will be added to Wowza 3.

Richard

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [November 10, 2011, 12:34am UTC](https://community.wowza.com/t/access-livestreampacketizer-cupertino-programmatically/37020/6 "2011-11-10T00:34:34Z")

</div>

Yes, you can stream to iOS with Wowza 2.

Richard

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [November 10, 2011, 10:17am UTC](https://community.wowza.com/t/access-livestreampacketizer-cupertino-programmatically/37020/7 "2011-11-10T10:17:25Z")

</div>

I don’t think so. You need Wowza 3 and IMediaStreamActionNotify3

[https://www.wowza.com/docs/how-to-use-imediastreamactionnotify3-interface-to-listen-for-rtmp-stream-events-includes-codec-info](https://www.wowza.com/docs/how-to-use-imediastreamactionnotify3-interface-to-listen-for-rtmp-stream-events-includes-codec-info)

Richard

---

<div class="post-metadata">

### Author: ![fatos\_bekteshi](https://avatars.discourse-cdn.com/v4/letter/f/2acd7d/32.png) [@fatos\_bekteshi](https://community.wowza.com/u/fatos_bekteshi)
#### Post date: [November 7, 2011, 8:08am UTC](https://community.wowza.com/t/access-livestreampacketizer-cupertino-programmatically/37020/8 "2011-11-07T08:08:03Z")

</div>

thanks richard, that was very helpful,

Is there a away of quering IMediaStream or any other object on the API of number of streams in a Container,

i.e if you are publishing video and audio than this property would return 2, but if there is only audio than this property would return 1

thanks

---

<div class="post-metadata">

### Author: ![fatos\_bekteshi](https://avatars.discourse-cdn.com/v4/letter/f/2acd7d/32.png) [@fatos\_bekteshi](https://community.wowza.com/u/fatos_bekteshi)
#### Post date: [November 8, 2011, 2:13am UTC](https://community.wowza.com/t/access-livestreampacketizer-cupertino-programmatically/37020/9 "2011-11-08T02:13:00Z")

</div>

onCodecInfoAudio is triggered only if there is audio stream on the mediastream

onCodecInfoVideo is triggered only if there is video stream on the mediastream

so there must be code that knows in advance whether both onCodecInfoAudio onCodecInfoVideo should be notified

this value would allow me in advance to make a decision on what path to take:

if audio only take path 1

if video only take path 2

if audio and video handle the events differently

so when onCodecInfoVideo is called (i persume i have an audio too so i wait for the onCodecInfoAudio to be called )

but there is no audio so onCodecInfoAudio is never called.

one way to resolve this would be to add another method to IMediaStreamActionNotify3

that gets called after onCodecInfoAudio, or else i have to add another module on the pipeline that gets executed after this module to check wether both events have been triggered.

but this would no be the best way of handling this problem.

---

<div class="post-metadata">

### Author: ![fatos\_bekteshi](https://avatars.discourse-cdn.com/v4/letter/f/2acd7d/32.png) [@fatos\_bekteshi](https://community.wowza.com/u/fatos_bekteshi)
#### Post date: [November 8, 2011, 7:40am UTC](https://community.wowza.com/t/access-livestreampacketizer-cupertino-programmatically/37020/10 "2011-11-08T07:40:32Z")

</div>

thanks Richard, it’s now working.

I just realized that IMediaStreamActionNotify3 is only available on wowza 3 is it possible to listen to onCodecInfoAudio and onCodecInfoVideo on wowza 2?

---

<div class="post-metadata">

### Author: ![fatos\_bekteshi](https://avatars.discourse-cdn.com/v4/letter/f/2acd7d/32.png) [@fatos\_bekteshi](https://community.wowza.com/u/fatos_bekteshi)
#### Post date: [November 9, 2011, 2:01am UTC](https://community.wowza.com/t/access-livestreampacketizer-cupertino-programmatically/37020/11 "2011-11-09T02:01:44Z")

</div>

Is there any way of testing iphone/ipad compatiblity on wowza 2?

this would be helpful as upgrading to wowza3 on live systems can be a longer/riskier task than adding a new module on existing wowza2.

thanks

---

<div class="post-metadata">

### Author: ![fatos\_bekteshi](https://avatars.discourse-cdn.com/v4/letter/f/2acd7d/32.png) [@fatos\_bekteshi](https://community.wowza.com/u/fatos_bekteshi)
#### Post date: [November 10, 2011, 2:04am UTC](https://community.wowza.com/t/access-livestreampacketizer-cupertino-programmatically/37020/12 "2011-11-10T02:04:31Z")

</div>

I meant programmatically check(on wowza 2, from within a module) if the stream that is being published is IOS compatible.
