| 235 | } |
| 236 | |
| 237 | static int audio_read_header(AVFormatContext *context) |
| 238 | { |
| 239 | JackData *self = context->priv_data; |
| 240 | AVStream *stream; |
| 241 | int test; |
| 242 | |
| 243 | if ((test = start_jack(context))) |
| 244 | return test; |
| 245 | |
| 246 | stream = avformat_new_stream(context, NULL); |
| 247 | if (!stream) { |
| 248 | stop_jack(self); |
| 249 | return AVERROR(ENOMEM); |
| 250 | } |
| 251 | |
| 252 | stream->codecpar->codec_type = AVMEDIA_TYPE_AUDIO; |
| 253 | #if HAVE_BIGENDIAN |
| 254 | stream->codecpar->codec_id = AV_CODEC_ID_PCM_F32BE; |
| 255 | #else |
| 256 | stream->codecpar->codec_id = AV_CODEC_ID_PCM_F32LE; |
| 257 | #endif |
| 258 | stream->codecpar->sample_rate = self->sample_rate; |
| 259 | stream->codecpar->ch_layout.nb_channels = self->nports; |
| 260 | |
| 261 | avpriv_set_pts_info(stream, 64, 1, 1000000); /* 64 bits pts in us */ |
| 262 | return 0; |
| 263 | } |
| 264 | |
| 265 | static int audio_read_packet(AVFormatContext *context, AVPacket *pkt) |
| 266 | { |
nothing calls this directly
no test coverage detected