/usr/include/thunderbird/ContainerWriter.h is in thunderbird-dev 1:24.4.0+build1-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-*/
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef ContainerWriter_h_
#define ContainerWriter_h_
#include "nsTArray.h"
#include "nsAutoPtr.h"
namespace mozilla {
/**
* ContainerWriter packs encoded track data into a specific media container.
*/
class ContainerWriter {
public:
ContainerWriter()
: mInitialized(false)
{}
virtual ~ContainerWriter() {}
enum {
END_OF_STREAM = 1 << 0
};
/**
* Writes encoded track data from aBuffer to a packet, and insert this packet
* into the internal stream of container writer. aDuration is the playback
* duration of this packet in number of samples. aFlags is true with
* END_OF_STREAM if this is the last packet of track.
* Currently, WriteEncodedTrack doesn't support multiple tracks.
*/
virtual nsresult WriteEncodedTrack(const nsTArray<uint8_t>& aBuffer,
int aDuration, uint32_t aFlags = 0) = 0;
enum {
FLUSH_NEEDED = 1 << 0
};
/**
* Copies the final container data to a buffer if it has accumulated enough
* packets from WriteEncodedTrack. This buffer of data is appended to
* aOutputBufs, and existing elements of aOutputBufs should not be modified.
* aFlags is true with FLUSH_NEEDED will force OggWriter to flush an ogg page
* even it is not full, and copy these container data to a buffer for
* aOutputBufs to append.
*/
virtual nsresult GetContainerData(nsTArray<nsTArray<uint8_t> >* aOutputBufs,
uint32_t aFlags = 0) = 0;
protected:
bool mInitialized;
};
}
#endif
|