comparison avformat.h @ 2573:2842354cb9a4 libavformat

Added definition and utility functions to handle AVProgram(s) in AVFormatContext
author nicodvb
date Tue, 25 Sep 2007 20:45:46 +0000
parents c57d3d6c8f44
children 3afd8e729331
comparison
equal deleted inserted replaced
2572:aabd822b5db5 2573:2842354cb9a4
19 */ 19 */
20 20
21 #ifndef AVFORMAT_H 21 #ifndef AVFORMAT_H
22 #define AVFORMAT_H 22 #define AVFORMAT_H
23 23
24 #define LIBAVFORMAT_VERSION_INT ((51<<16)+(13<<8)+4) 24 #define LIBAVFORMAT_VERSION_INT ((51<<16)+(14<<8)+0)
25 #define LIBAVFORMAT_VERSION 51.13.4 25 #define LIBAVFORMAT_VERSION 51.14.0
26 #define LIBAVFORMAT_BUILD LIBAVFORMAT_VERSION_INT 26 #define LIBAVFORMAT_BUILD LIBAVFORMAT_VERSION_INT
27 27
28 #define LIBAVFORMAT_IDENT "Lavf" AV_STRINGIFY(LIBAVFORMAT_VERSION) 28 #define LIBAVFORMAT_IDENT "Lavf" AV_STRINGIFY(LIBAVFORMAT_VERSION)
29 29
30 #include <time.h> 30 #include <time.h>
343 343
344 #define MAX_REORDER_DELAY 4 344 #define MAX_REORDER_DELAY 4
345 int64_t pts_buffer[MAX_REORDER_DELAY+1]; 345 int64_t pts_buffer[MAX_REORDER_DELAY+1];
346 } AVStream; 346 } AVStream;
347 347
348 #define AV_PROGRAM_RUNNING 1
349
350 typedef struct AVProgram {
351 int id;
352 char *provider_name; ///< Network name for DVB streams
353 char *name; ///< Service name for DVB streams
354 int flags;
355 enum AVDiscard discard; ///< selects which program to discard and which to feed to the caller
356 } AVProgram;
357
348 #define AVFMTCTX_NOHEADER 0x0001 /**< signal that no header is present 358 #define AVFMTCTX_NOHEADER 0x0001 /**< signal that no header is present
349 (streams are added dynamically) */ 359 (streams are added dynamically) */
350 360
351 #define MAX_STREAMS 20 361 #define MAX_STREAMS 20
352 362
428 */ 438 */
429 int max_analyze_duration; 439 int max_analyze_duration;
430 440
431 const uint8_t *key; 441 const uint8_t *key;
432 int keylen; 442 int keylen;
443
444 unsigned int nb_programs;
445 AVProgram **programs;
433 } AVFormatContext; 446 } AVFormatContext;
434 447
435 typedef struct AVPacketList { 448 typedef struct AVPacketList {
436 AVPacket pkt; 449 AVPacket pkt;
437 struct AVPacketList *next; 450 struct AVPacketList *next;
645 * 658 *
646 * @param s media file handle 659 * @param s media file handle
647 * @param id file format dependent stream id 660 * @param id file format dependent stream id
648 */ 661 */
649 AVStream *av_new_stream(AVFormatContext *s, int id); 662 AVStream *av_new_stream(AVFormatContext *s, int id);
663 AVProgram *av_new_program(AVFormatContext *s, int id);
650 664
651 /** 665 /**
652 * Set the pts for a given stream. 666 * Set the pts for a given stream.
653 * 667 *
654 * @param s stream 668 * @param s stream