~ubuntu-branches/ubuntu/jaunty/xvidcap/jaunty-proposed

« back to all changes in this revision

Viewing changes to ffmpeg/libavcodec/libdirac_libschro.h

  • Committer: Bazaar Package Importer
  • Author(s): Lionel Le Folgoc, Andrew Starr-Bochicchio, Lionel Le Folgoc
  • Date: 2008-12-26 00:10:06 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20081226001006-2040ls9680bd1blt
Tags: 1.1.7-0.2ubuntu1
[ Andrew Starr-Bochicchio ]
* Merge from debian-multimedia (LP: #298547), Ubuntu Changes:
 - For ffmpeg-related build-deps, fix versionized dependencies
   as the ubuntu versioning is different than debian-multimedia's.

[ Lionel Le Folgoc ]
* LP: #311412 is fixed since the 1.1.7~rc1-0.1 revision.
* debian/patches/03_ffmpeg.diff: updated to fix FTBFS due to libswscale API
  change (cherry-pick from Gentoo #234383).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (c) 2008 BBC, Anuradha Suraparaju <asuraparaju at gmail dot com >
 
3
 *
 
4
 * This file is part of FFmpeg.
 
5
 *
 
6
 * FFmpeg is free software; you can redistribute it and/or
 
7
 * modify it under the terms of the GNU Lesser General Public
 
8
 * License as published by the Free Software Foundation; either
 
9
 * version 2.1 of the License, or (at your option) any later version.
 
10
 *
 
11
 * FFmpeg is distributed in the hope that it will be useful,
 
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
14
 * Lesser General Public License for more details.
 
15
 *
 
16
 * You should have received a copy of the GNU Lesser General Public
 
17
 * License along with FFmpeg; if not, write to the Free Software
 
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
19
 */
 
20
 
 
21
/**
 
22
* @file libdirac_libschro.h
 
23
* data structures common to libdirac and libschroedinger
 
24
*/
 
25
 
 
26
#ifndef FFMPEG_LIBDIRAC_LIBSCHRO_H
 
27
#define FFMPEG_LIBDIRAC_LIBSCHRO_H
 
28
 
 
29
#include "avcodec.h"
 
30
 
 
31
typedef struct
 
32
{
 
33
    uint16_t width;
 
34
    uint16_t height;
 
35
    uint16_t frame_rate_num;
 
36
    uint16_t frame_rate_denom;
 
37
} FfmpegDiracSchroVideoFormatInfo;
 
38
 
 
39
/**
 
40
* Returns the index into the Dirac Schro common video format info table
 
41
*/
 
42
unsigned int ff_dirac_schro_get_video_format_idx (AVCodecContext *avccontext);
 
43
 
 
44
/**
 
45
* contains a single encoded frame returned from Dirac or Schroedinger
 
46
*/
 
47
typedef struct FfmpegDiracSchroEncodedFrame
 
48
{
 
49
    /** encoded frame data */
 
50
    uint8_t *p_encbuf;
 
51
 
 
52
    /** encoded frame size */
 
53
    uint32_t size;
 
54
 
 
55
    /** encoded frame number. Will be used as pts */
 
56
    uint32_t frame_num;
 
57
 
 
58
    /** key frame flag. 1 : is key frame , 0 : in not key frame */
 
59
    uint16_t key_frame;
 
60
} FfmpegDiracSchroEncodedFrame;
 
61
 
 
62
/**
 
63
* queue element
 
64
*/
 
65
typedef struct FfmpegDiracSchroQueueElement
 
66
{
 
67
    /** Data to be stored in queue*/
 
68
    void *data;
 
69
    /** Pointer to next element queue */
 
70
    struct FfmpegDiracSchroQueueElement *next;
 
71
} FfmpegDiracSchroQueueElement;
 
72
 
 
73
 
 
74
/**
 
75
* A simple queue implementation used in libdirac and libschroedinger
 
76
*/
 
77
typedef struct FfmpegDiracSchroQueue
 
78
{
 
79
    /** Pointer to head of queue */
 
80
    FfmpegDiracSchroQueueElement *p_head;
 
81
    /** Pointer to tail of queue */
 
82
    FfmpegDiracSchroQueueElement *p_tail;
 
83
} FfmpegDiracSchroQueue;
 
84
 
 
85
/**
 
86
* Initialise the queue
 
87
*/
 
88
void ff_dirac_schro_queue_init(FfmpegDiracSchroQueue *queue);
 
89
 
 
90
/**
 
91
* Add an element to the end of the queue
 
92
*/
 
93
int ff_dirac_schro_queue_push_back (FfmpegDiracSchroQueue *queue, void *p_data);
 
94
 
 
95
/**
 
96
* Return the first element in the queue
 
97
*/
 
98
void *ff_dirac_schro_queue_pop (FfmpegDiracSchroQueue *queue);
 
99
 
 
100
/**
 
101
* Free the queue resources. free_func is a function supplied by the caller to
 
102
* free any resources allocated by the caller. The data field of the queue
 
103
* element is passed to it.
 
104
*/
 
105
void ff_dirac_schro_queue_free(FfmpegDiracSchroQueue *queue,
 
106
                               void (*free_func)(void *));
 
107
#endif /* FFMPEG_LIBDIRAC_LIBSCHRO_H */