2 * Copyright (C) 2020 Intel Corporation
3 * Author: He Junyan <junyan.he@intel.com>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the0
17 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
21 #ifndef __GST_H264_BIT_WRITER_H__
22 #define __GST_H264_BIT_WRITER_H__
24 #include <gst/codecparsers/codecparsers-prelude.h>
25 #include <gst/codecparsers/gsth264parser.h>
30 * GstH264BitWriterResult:
31 * @GST_H264_BIT_WRITER_OK: The writing succeeded
32 * @GST_H264_BIT_WRITER_INVALID_DATA: The input data to write is invalid
33 * @GST_H264_BIT_WRITER_NO_MORE_SPACE: The output does not have enough size
34 * @GST_H264_BIT_WRITER_ERROR: An general error occurred when writing
36 * The result of writing H264 data into bit stream.
42 GST_H264_BIT_WRITER_OK,
43 GST_H264_BIT_WRITER_INVALID_DATA,
44 GST_H264_BIT_WRITER_NO_MORE_SPACE,
45 GST_H264_BIT_WRITER_ERROR
46 } GstH264BitWriterResult;
49 GstH264BitWriterResult gst_h264_bit_writer_sps (const GstH264SPS * sps,
54 GstH264BitWriterResult gst_h264_bit_writer_pps (const GstH264PPS * pps,
59 GstH264BitWriterResult gst_h264_bit_writer_slice_hdr (const GstH264SliceHdr * slice,
61 GstH264NalUnitType nal_type,
66 GstH264BitWriterResult gst_h264_bit_writer_sei (GArray * sei_messages,
71 GstH264BitWriterResult gst_h264_bit_writer_aud (guint8 primary_pic_type,
76 GstH264BitWriterResult gst_h264_bit_writer_convert_to_nal (guint nal_prefix_size,
78 gboolean has_startcode,
79 gboolean add_trailings,
80 const guint8 * raw_data,
87 #endif /* __GST_H264_BIT_WRITER_H__ */