Go to the documentation of this file.
   36 #include <openssl/rand.h> 
   62     setvbuf(fp, 
NULL, _IONBF, 0);
 
   63     err = fread(
dst, 1, 
len, fp);
 
   82     static uint64_t 
i = 0;
 
   83     static uint32_t 
buffer[512] = { 0 };
 
   84     unsigned char digest[20];
 
   86     int repeats[3] = { 0 };
 
  102         int incremented_i = 0;
 
  103         int cur_td = t - last_t;
 
  104         if (last_t + 2*last_td + (CLOCKS_PER_SEC > 1000) < t) {
 
  110             buffer[++
i & 511] += cur_td % 3294638521
U;
 
  112         } 
else if (t != last_t && repeats[0] > 0 && repeats[1] > 0 &&
 
  113                    repeats[2] > 0 && repeats[0] != repeats[1] &&
 
  114                    repeats[0] != repeats[2]) {
 
  120             buffer[++
i & 511] += (repeats[0] + repeats[1] + repeats[2]) % 3294638521
U;
 
  123             buffer[
i & 511] = 1664525*
buffer[
i & 511] + 1013904223 + (cur_td % 3294638521
U);
 
  125         if (incremented_i && (t - init_t) >= CLOCKS_PER_SEC>>5) {
 
  126             if (last_i && 
i - last_i > 4 || 
i - last_i > 64 || 
TEST && 
i - last_i > 8)
 
  133             if (repeats[0] != repeats[1]) {
 
  134                 repeats[2] = repeats[1];
 
  135                 repeats[1] = repeats[0];
 
  164     BCRYPT_ALG_HANDLE algo_handle;
 
  165     NTSTATUS 
ret = BCryptOpenAlgorithmProvider(&algo_handle, BCRYPT_RNG_ALGORITHM,
 
  166                                                MS_PRIMITIVE_PROVIDER, 0);
 
  167     if (BCRYPT_SUCCESS(
ret)) {
 
  168         NTSTATUS 
ret = BCryptGenRandom(algo_handle, (PUCHAR)buf, 
len, 0);
 
  169         BCryptCloseAlgorithmProvider(algo_handle, 0);
 
  170         if (BCRYPT_SUCCESS(
ret))
 
  175 #if HAVE_ARC4RANDOM_BUF 
  176     arc4random_buf(buf, 
len);
 
  185     gcry_randomize(buf, 
len, GCRY_VERY_STRONG_RANDOM);
 
  188     if (RAND_bytes(buf, 
len) == 1)
 
  
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
av_cold int av_sha_init(AVSHA *ctx, int bits)
Initialize SHA-1 or SHA-2 hashing.
#define AVERROR_UNKNOWN
Unknown error, typically from an external library.
uint32_t av_get_random_seed(void)
Get a seed to use in conjunction with random functions.
#define av_assert0(cond)
assert() equivalent, that is always enabled.
void av_sha_final(AVSHA *ctx, uint8_t *digest)
Finish hashing and output digest value.
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
void av_sha_update(struct AVSHA *ctx, const uint8_t *data, size_t len)
Update hash value.
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_RB32
#define AVERROR_EXTERNAL
Generic error in an external library.
#define i(width, name, range_min, range_max)
int av_random_bytes(uint8_t *buf, size_t len)
Generate cryptographically secure random data, i.e.
FILE * avpriv_fopen_utf8(const char *path, const char *mode)
Open a file using a UTF-8 filename.
the frame and frame reference mechanism is intended to as much as expensive copies of that data while still allowing the filters to produce correct results The data is stored in buffers represented by AVFrame structures Several references can point to the same frame buffer
static uint32_t get_generic_seed(void)
static int read_random(uint8_t *dst, size_t len, const char *file)