cscg24-guacamole

CSCG 2024 Challenge 'Guacamole Mashup'
git clone https://git.sinitax.com/sinitax/cscg24-guacamole
Log | Files | Refs | sfeed.txt

encode.h (2113B)


      1/*
      2 * Licensed to the Apache Software Foundation (ASF) under one
      3 * or more contributor license agreements.  See the NOTICE file
      4 * distributed with this work for additional information
      5 * regarding copyright ownership.  The ASF licenses this file
      6 * to you under the Apache License, Version 2.0 (the
      7 * "License"); you may not use this file except in compliance
      8 * with the License.  You may obtain a copy of the License at
      9 *
     10 *   http://www.apache.org/licenses/LICENSE-2.0
     11 *
     12 * Unless required by applicable law or agreed to in writing,
     13 * software distributed under the License is distributed on an
     14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
     15 * KIND, either express or implied.  See the License for the
     16 * specific language governing permissions and limitations
     17 * under the License.
     18 */
     19
     20#ifndef GUACENC_ENCODE_H
     21#define GUACENC_ENCODE_H
     22
     23#include "config.h"
     24
     25#include <stdbool.h>
     26
     27/**
     28 * Encodes the given Guacamole protocol dump as video. A read lock will be
     29 * acquired on the input file to ensure that in-progress recordings are not
     30 * encoded. This behavior can be overridden by specifying true for the force
     31 * parameter.
     32 *
     33 * @param path
     34 *     The path to the file containing the raw Guacamole protocol dump.
     35 *
     36 * @param out_path
     37 *     The full path to the file in which encoded video should be written.
     38 *
     39 * @param codec
     40 *     The name of the codec to use for the video encoding, as defined by
     41 *     ffmpeg / libavcodec.
     42 *
     43 * @param width
     44 *     The width of the desired video, in pixels.
     45 *
     46 * @param height
     47 *     The height of the desired video, in pixels.
     48 *
     49 * @param bitrate
     50 *     The desired overall bitrate of the resulting encoded video, in bits per
     51 *     second.
     52 *
     53 * @param force
     54 *     Perform the encoding, even if the input file appears to be an
     55 *     in-progress recording (has an associated lock).
     56 *
     57 * @return
     58 *     Zero on success, non-zero if an error prevented successful encoding of
     59 *     the video.
     60 */
     61int guacenc_encode(const char* path, const char* out_path, const char* codec,
     62        int width, int height, int bitrate, bool force);
     63
     64#endif
     65